programmers

    [프로그래머스, 92335] k진수에서 소수 개수 구하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/92335 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 73.6 MB, 시간: 6.52 ms사용 알고리즘: 구현import java.util.*;class Solution { public int solution(int n, int k) { // n을 k진수로 변환 List toK = change(n, k); // 처음 나오는 0과 마지막에 나오는 0 구하기 int firstZero = -1, lastZero = -1;..

    [프로그래머스, 17677] [1차] 뉴스 클러스터링 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/17677 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 79.4 MB, 시간: 1.86 ms사용 알고리즘: 구현import java.util.*;class Solution { public int solution(String str1, String str2) { // str1의 다중집합 Map set1 = new HashMap(); getSet(str1, set1); // str2의 다중집합 Map set2..

    [프로그래머스, 284530] 연도 별 평균 미세먼지 농도 조회하기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/284530 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krselect year(ym) as 'YEAR', round(avg(pm_val1), 2) as 'PM10', round(avg(pm_val2), 2) as 'PM2.5'from air_pollutionwhere location2 = '수원'group by 1order by 1;

    [프로그래머스, 150369] 택배 배달과 수거하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/150369 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 83.4 MB, 시간: 20.63 ms사용 알고리즘: 구현class Solution { public long solution(int cap, int n, int[] deliveries, int[] pickups) { long answer = 0; // 가장 뒤에 있는 배달지 int lastDelivery = -1; for(int i = n - 1; i >= 0; i--) { ..

    [프로그래머스, 293261] 물고기 종류 별 대어 찾기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/293261 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.krselect fi.id as id, fni.fish_name as fish_name, lengthfrom fish_info as fileft join fish_name_info as fnion fi.fish_type = fni.fish_typewhere (fi.fish_type, length) in ( select fish_type, max(length) from fish_info group by fish_type);

    [프로그래머스, 132265] 롤케이크 자르기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/132265 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 119 MB, 시간: 27.84 ms사용 알고리즘: 구현class Solution { public int solution(int[] topping) { int answer = 0; // 형과 동생의 각 토핑 개수 int[] t1 = new int[10_001]; int[] t2 = new int[10_001]; // 형과 동생의 토핑 ..

    [프로그래머스, 64065] 튜플 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/64065 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 111 MB, 시간: 45.90 ms사용 알고리즘: 자료구조, 문자열import java.util.*;class Solution { public int[] solution(String s) { int start, end; StringTokenizer st; ArrayList list; Map map = new HashMap(); for(int i = 1; i ();..

    [프로그래머스, 12949] 행렬의 곱셈 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/12949 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 76.8 MB, 시간: 11.13 ms사용 알고리즘: 배열class Solution { public int[][] solution(int[][] arr1, int[][] arr2) { int[][] answer = new int[arr1.length][arr2[0].length]; for(int i = 0; i

    [프로그래머스, 87390] n^2 배열 자르기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/87390 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 111 MB, 시간: 8.38 ms사용 알고리즘: 구현class Solution { public int[] solution(int n, long left, long right) { int[] answer = new int[(int)(right - left) + 1]; long x, y, num; for(long i = left; i

    [프로그래머스, 76502] 괄호 회전하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/76502 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 87 MB, 시간: 569.57 ms사용 알고리즘: 스택import java.util.*;class Solution { public int solution(String s) { int answer = 0; List sList = new LinkedList(); for(int i = 0; i stack = new Stack(); boolean flag; ..