| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | |||||
| 3 | 4 | 5 | 6 | 7 | 8 | 9 |
| 10 | 11 | 12 | 13 | 14 | 15 | 16 |
| 17 | 18 | 19 | 20 | 21 | 22 | 23 |
| 24 | 25 | 26 | 27 | 28 | 29 | 30 |
| 31 |
- 러닝일지
- db
- binary search
- 투포인터
- DP
- 알고리즘
- greedy
- 운동기록
- 자바
- 문제해결
- BFS
- Java
- math
- SWEA
- 문자열
- priorityqueue
- 이분탐색
- MySQL
- 건강
- BOJ
- 문제풀이
- 코테
- 프로그래머스
- SQL
- 백준
- 시뮬레이션
- COS PRO
- dfs
- 코딩테스트
- oracle
- Today
- Total
목록Algorithms/Programmers (88)
슈콩
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/76502# 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public int solution(String s) { int answer = 0; int n = s.length(); Stack stack; for(int i=0;i(); boolean check = true; for(char c : result.toCharArray()..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/131127 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public int solution(String[] want, int[] number, String[] discount) { int answer = 0; int n = want.length; Map wantMap = new HashMap(); Map disMap; for(int i=0;i(); ..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/131701 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public int solution(int[] elements) { int answer = 0; int n = elements.length; Set hs = new HashSet(); for(int i=0;i
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12985 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]class Solution{ public int solution(int n, int a, int b) { int answer = 0; while(a!=b){ a = (a+1) / 2; b = (b+1) / 2; answer++; } return answer; }}
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12981 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution { public int[] solution(int n, String[] words) { int[] answer = {0,0}; int order = 1; int total = words.length; Set hs = new HashSet(); hs.add(words[0]); for(int i=..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12914 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]class Solution { public long solution(int n) { if(n
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12980 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;public class Solution { public int solution(int n) { int ans = 0; while(n>0){ if(n%2==0){ n /= 2; } else{ n--; ans++; ..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/138476 [소스 코드]import java.util.*;class Solution { public int solution(int k, int[] tangerine) { int answer = 0; Map hm = new HashMap(); for(int t : tangerine){ hm.put(t,hm.getOrDefault(t,0)+1); } List list = new ArrayList(hm.values()); Collections.sort(list,(a,b)->b-a); in..
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12945 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]class Solution { public int solution(int n) { if(n==0) return 0; if(n==1) return 1; int cnt = 1, a = 0,b = 1; while(cnt
[문제]https://school.programmers.co.kr/learn/courses/30/lessons/12973 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr [소스 코드]import java.util.*;class Solution{ public int solution(String s) { Stack stack = new Stack(); for(Character c : s.toCharArray()){ if(stack.isEmpty()) stack.push(c); else{ if(stack.peek()..