Problem Solving/Programmers

    [프로그래머스, 67260] [카카오 인턴] 동굴 탐험 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/67260 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 143 MB, 시간: 285.11 ms사용 알고리즘: 그래프, 스택, DFSimport java.util.*;class Solution { public boolean solution(int n, int[][] path, int[][] order) { // 인접한 동굴 정보를 담을 리스트 ArrayList> edges = new ArrayList(); for(int i = 0; i ()); ..

    [프로그래머스, 49189] 가장 먼 노드 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/49189 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 119 MB, 시간: 31.81 ms사용 알고리즘: 그래프, 다익스트라import java.util.*;class Solution { public int solution(int n, int[][] edge) { int answer = 0; int maxLength = 0; // 최단거리를 저장할 배열 int[] minLength = new int[n + 1]; Ar..

    [프로그래머스, 120807] 숫자 비교하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/120807 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 88.6 MB, 시간: 0.02 ms사용 알고리즘: 구현class Solution { public int solution(int num1, int num2) { return num1 == num2 ? 1 : -1; }}

    [프로그래머스, 120803] 두 수의 차 구하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/120803 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 83.1 MB, 시간: 0.02 ms사용 알고리즘: 구현class Solution { public int solution(int num1, int num2) { return num1 - num2; }}

    [프로그래머스, 120810] 나머지 구하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/120810 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 85.9 MB, 시간: 0.03 ms사용 알고리즘: 구현class Solution { public int solution(int num1, int num2) { return num1 % num2; }}

    [프로그래머스, 160586] 대충 만든 자판 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/160586 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 91.5 MB, 시간: 2.39 ms사용 알고리즘: 자료구조, 문자열import java.util.*;class Solution { public int[] solution(String[] keymap, String[] targets) { HashMap km = new HashMap(); // 각 키별로 가장 적게 누를 수 있는 횟수 저장 String key; char k; ..

    [프로그래머스, 155652] 둘만의 암호 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/155652 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 77.4 MB, 시간: 0.09 ms사용 알고리즘: 문자열class Solution { public String solution(String s, String skip, int index) { // 각 알파벳이 skip에 포함되는지 여부 확인 boolean[] inSkip = new boolean['z' - 'a' + 1]; for(int i = 0; i

    [프로그래머스, 133499] 옹알이 (2) (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/133499 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 84.5 MB, 시간: 0.26 ms사용 알고리즘: 문자열, 구현class Solution { public int solution(String[] babbling) { int answer = 0; int pre; // 1: aya, 2: ye, 3: woo, 4: ma int idx; String s; for(int i = 0; i = 3 ..

    [프로그래머스, 120805] 몫 구하기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/120805 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 71.8 MB, 시간: 0.02 ms사용 알고리즘: 구현class Solution { public int solution(int num1, int num2) { return num1 / num2; }}

    [프로그래머스, 12977] 소수 만들기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/12977 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 92.2 MB, 시간: 1.48 ms사용 알고리즘: 구현class Solution { public int solution(int[] nums) { // 1 이상 3,000 이하의 수 중, 소수인 것들 구하기 boolean[] isNotPrimeNumber = new boolean[3_001]; isNotPrimeNumber[1] = true; for(int i =..