📋오늘 푼 코딩테스트
더보기
https://computerreport.tistory.com/105
[MySQL]년, 월, 성별 별 상품 구매 회원 수 구하기
https://school.programmers.co.kr/learn/courses/30/lessons/131532 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr 📚문제USER_INFO 테이
computerreport.tistory.com
https://school.programmers.co.kr/learn/courses/30/lessons/142086
프로그래머스
SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프
programmers.co.kr
import java.util.HashMap;
import java.util.Map;
class Solution {
public int[] solution(String s) {
int[] result = new int[s.length()];
Map<Character,Integer> maps =new HashMap<>();
for(int i=0;i<s.length();i++){
if(!maps.containsKey(s.charAt(i))==true){
result[i] = -1;
maps.put(s.charAt(i),i);
continue;
}
result[i] = i - maps.get(s.charAt(i));
maps.put(s.charAt(i),i);
}
return result;
}
}
📖 오늘 작성한 글
✒️ 회고
- 조금씩 Git 에 적응되고 있는거 같아 다행이다.
- 코딩테스트 알고리즘 공부하기!
'TIL' 카테고리의 다른 글
[TIL] 2025-04-16 (0) | 2025.04.16 |
---|---|
[TIL]2025-04-15 (0) | 2025.04.16 |
[TIL] 2025-04-11 (1) | 2025.04.11 |
[TIL] 2025-04-10 (1) | 2025.04.10 |
[TIL] 2025-04-09 (0) | 2025.04.09 |