분류 전체보기 47

[코딩테스트(Java)] 프로그래머스 81301 숫자 문자열과 영단어

https://school.programmers.co.kr/learn/courses/30/lessons/81301 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krpublic int solution(String s) { int answer = 0; String answerString = ""; String string = ""; for (int i = 0; i 처음에 그냥 1차원적으로 생각해서 풀었는데 시간 복잡도 관점에서만 유리하고 뭔가 다른 방법이 많을 것 같아서 다른 방법으로 다시 풀었다. public int solution(String s) { String[] digits..

코딩테스트 2025.03.13

[코딩테스트(Java)] 프로그래머스 77484 로또의 최고 순위와 최저 순위

https://school.programmers.co.kr/learn/courses/30/lessons/77484 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr public int[] solution(int[] lottos, int[] win_nums) { int[] answer = new int[2]; int countZ = 0; // 0 개수 int countNum = 0; // 맞춘 숫자 for (int i = 0; i 1) { // 최대 등수 구하기 answer[0] = answer[1] - countZ; } else { answer[0] =..

코딩테스트 2025.03.12

[코딩테스트(Java)] 프로그래머스 50048 베스트앨범

https://school.programmers.co.kr/learn/courses/30/lessons/42579 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr public int[] solution(String[] genres, int[] plays) { int[] answer = new int[genres.length]; Map> hashMap = new LinkedHashMap(); Map linkedHashMap = new LinkedHashMap(); for (int i = 0; i 를 value를 가지는 hashMap 생성 hashMap.put(i, List..

코딩테스트 2025.03.12

[코딩테스트(Java)] 프로그래머스 92334 신고 결과 받기

https://school.programmers.co.kr/learn/courses/30/lessons/92334 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr public int[] solution(String[] id_list, String[] report, int k) { int[] count = new int[id_list.length]; int[] answer = new int[id_list.length]; HashMap hashMap = new HashMap(); for (int i = 0; i set = new HashSet(Arrays.asList(report));..

코딩테스트 2025.03.11

[코딩테스트(Java)] 프로그래머스 72410 신규 아이디 추천

https://school.programmers.co.kr/learn/courses/30/lessons/72410 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr public String solution(String new_id) { String answer = ""; answer = new_id.toLowerCase(); // 1 answer = answer.replaceAll("[~!@#$%^&*()=+\\[\\]{}:?,/]", ""); // 2 for (int i = 0; i 15) { //6 answer = answer.substring(0, 15); }..

코딩테스트 2025.03.09

[코딩테스트(Java)] 프로그래머스 42889 실패율

https://school.programmers.co.kr/learn/courses/30/lessons/42889# 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr  public int[] solution(int N, int[] stages) { int[] answer = new int[N]; LinkedHashMap hashMap = new LinkedHashMap(); int over; int same; for (int i = 0; i i) { over++; } if (stages[j] == (i + 1))..

코딩테스트 2025.03.08

[SpringBoot] Spring Batch로 csv파일을 db에 저장해보자

📍개요https://inhooo00.tistory.com/entry/SpringBoot-Google-Places-API-%EC%82%AC%EC%9A%A9%ED%95%B4%EB%B3%B4%EA%B8%B0 [SpringBoot] Google Places API 사용해보기📍개요프론트에게 좌표를 전달하기 위해서, 구글 API를 사용해서 주소값을 좌표값으로 변환하는 로직을 구현하고자 한다.코드로 구현하기 전 Places API를 호출해보겠다.  📍API 키 만들기https://dinhooo00.tistory.com 이전 글에서 Google places API를 통해 특정 장소의 다양한 정보들을 받아올 수 있었다.이를 파이썬 코드를 이용해서 추출한 뒤 (이 방법은 추후에..),맛집 리스트를 공공 데이터 포털에..

springboot 2025.03.08

[코딩테스트(Java)] 프로그래머스 17682 다트 게임

https://school.programmers.co.kr/learn/courses/30/lessons/17682 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr public int solution(String dartResult) { int answer = 0; List result = new ArrayList(); String number = ""; for (int i = 0; i  📍포인트1 .처음 다트 3번 던지는 기준을 어떻게 나눌지가 가장 고민이였음.2. 그 뒤의 로직은 리스트 순서 관리만 잘 하면 해결.3. 재활 2일차 📍삽질1. 다트 게임 3번을 나눠서 진행 vs ..

코딩테스트 2025.03.07

[코딩테스트(Java)] 프로그래머스 17681 비밀지도

오늘부터 재활 들어갑니다..https://school.programmers.co.kr/learn/courses/30/lessons/17681 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr public String[] solution(int n, int[] arr1, int[] arr2) { String[] answer = new String[n]; String[] arr1To = new String[n]; String[] arr2To = new String[n]; for (int i = 0; i  📍포인트1. arr1To[i] = String.format("%" + n + "s"..

코딩테스트 2025.03.06

[SpringBoot] Google Places API 사용해보기

📍개요프론트에게 좌표를 전달하기 위해서, 구글 API를 사용해서 주소값을 좌표값으로 변환하는 로직을 구현하고자 한다.코드로 구현하기 전 Places API를 호출해보겠다.  📍API 키 만들기https://developers.google.com/maps/documentation/places/web-service/overview?hl=ko 개요  |  Places API  |  Google for Developers사용자가 입력할 때 비즈니스, 주소 및 관심 장소와 같은 장소를 반환하여 텍스트 기반 지역 검색에 관한 예상 검색어 예상 검색어를 제공합니다.developers.google.comGoogle Maps Platform에 들어가서 "시작하기"를 누르면 api 키를 얻을 수 있다. 만약 복사하지 ..

springboot 2025.03.06