API 로 보통 JSON 파일을 response 할 수 있다.response 한 JSON 파일을 Parsing 해서 사용하는 법을 정리해보자! JSON Object 사용을 위해 JSON.simple import 가 필요하다.plugin으로 사용 시 "여기"를,jar 파일을 사용할 경우 "여기"를 참고해보면 좋을 것 같다. API Connection 방법은 아래 글을 참고해보자.[API] Java API Connection(HttpURLConnection, JSONObject) JSON Parsing 을 할 때,JSON 파일에 어떤 구조로 데이터가 저장되어있는지 먼저 잘 파악한 후,key 에 해당하는 value 를 객체에 알맞게 저장해주면 된다. .Java JSON Parsing .Example01 loc..
.API Connection API Connection을 위한 예제를 살펴보려고 한다.예제에서는 request 후 response로 JSON Object를 받는 형태이다. JSON Object 사용을 위해 JSON.simple import 가 필요하다.plugin으로 사용 시 "여기"를,jar 파일을 사용할 경우 "여기"를 참고해보면 좋을 것 같다. JSON Parser 관련 정보는 아래 글을 참고해보자![API] Java JSONParser .example01 (GET) API 정보curl -X GET {BASE_URL}/example01 -H 'Authorization: {AUTH_KEY}' -H 'Content-Type: application/json' 1234567891011121314151617..
최근 몇몇 기업의 코딩테스트를 보면서자주 사용되었던 Map, Set 자료형에 대해서 정리를 해보려고 한다 ! HashMap 은 실무에서도 자주 사용된다고 하니 익숙하게 적응해두면 좋을 것 같다.자주 사용되는 Method 위주로 정리해보았다. . HashMap - Map은 Key와 Value라는 것을 한 쌍으로 갖는 자료형- 리스트나 배열처럼 순차적으로 해당 요소 값을 구하지 않고 key를 통해 value를 얻는다- Map의 가장 큰 특징이라면 key로 value를 얻어낸다는 점 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657import java.util.HashMa..
#. Problemhttps://www.acmicpc.net/problem/13023* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 처음에 문제 이해를 잘못하고 풀고..
#. Problemhttps://www.acmicpc.net/problem/19236* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 조건이 많아서 복잡했던 문제다....
#. Problemhttps://www.acmicpc.net/problem/20007* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 문제를 제대로 안 읽어서 헛고생을..
.compare Graph Algorithms .MST(Minimum Spanning Tree), 최소신장트리 정점 -1개의 간선으로 이루어진 신장트리 중에서 가중치의 합이 가장 작은 것고르는 간선은 사이클을 만들지 않아야 하고, 가중치가 작은 것들부터 골라져야 함 * 절대적이진 않지만, 간선이 적으면 KRUSKAL, 간선이 많으면 PRIM 알고리즘이 유리 .KRUSKAL (간선을 고르는 간선 중심)MST 의 목적을 이루기 위해 간선들을 가중치 오름차순으로 정렬해두고,사이클을 만들지 않는 간선이라면 골라나가서 N-1 개를 고르면 완료참고 ㅇ Use edgeList12345678910111213141516171819202122232425262728293031323334353637383940414243444..
#. Problemhttps://www.acmicpc.net/problem/15684* The copyright in this matter is in BOJ #. Resolution Process 1. Read and understand problem 2. Redefine the problem + abstract 3. Create solution plan (select Algorithm, Data structure) 4. Prove the plan (check performance time and usage memory) 5. Carry out the plan 6. Look back on the plan and find a way to improve it #. Solve 실수해서 시간을 엄청 날린 문제다..