Problem Solving/Programmers

    [프로그래머스, 12906] 같은 숫자는 싫어 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/12906 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 117 MB, 시간: 31.85 ms사용 알고리즘: 자료구조import java.util.*;public class Solution { public int[] solution(int []arr) { List list = new ArrayList(); list.add(arr[0]); for(int a : arr) { // 이전의 값과 동일하지 않을 ..

    [프로그래머스, 138476] 귤 고르기 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/138476 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr메모리: 165 MB, 시간: 206.32 ms사용 알고리즘: 정렬import java.util.*;class Solution { public int solution(int k, int[] tangerine) { // 인덱스에 해당하는 사이즈인 귤의 개수 int[] size = new int[10_000_001]; for(int s : tangerine) { ..

    [프로그래머스, 298515] 잡은 물고기 중 가장 큰 물고기의 길이 구하기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/298515 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krSELECT CONCAT(MAX(length), 'cm') AS max_lengthFROM fish_info

    [프로그래머스, 42577] 전화번호 목록 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/42577 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr메모리: 258 MB, 시간: 378.52 ms사용 알고리즘: 해시import java.util.*;class Solution { public boolean solution(String[] phone_book) { // 이전 번호를 담아둠 Set set = new HashSet(); for(int i = 0; i

    [프로그래머스, 42584] 주식가격 (java)

    https://school.programmers.co.kr/learn/courses/30/lessons/42584 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.kr메모리: 77.3 MB, 시간: 29.81 ms사용 알고리즘: 스택import java.util.*;class Solution { public int[] solution(int[] prices) { int[] answer = new int[prices.length]; // {prices, index} Deque stack = new ArrayDe..

    [프로그래머스, 293258] 잔챙이 잡은 수 구하기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/293258 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krSELECT COUNT(*) AS fish_countFROM fish_infoWHERE length IS NULL;

    [프로그래머스, 59042] 없어진 기록 찾기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/59042 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krSELECT animal_id, nameFROM animal_outsWHERE animal_id NOT IN ( SELECT animal_id FROM animal_ins)ORDER BY animal_id

    [프로그래머스, 293257] 물고기 종류 별 잡은 수 구하기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/293257 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krSELECT COUNT(*) AS fish_count, fish_nameFROM fish_info AS fiLEFT JOIN fish_name_info AS fni ON fi.fish_type = fni.fish_typeGROUP BY fish_nameORDER BY fish_count desc

    [프로그래머스, 59034] 모든 레코드 조회하기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/59034 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krSELECT *FROM animal_insORDER BY animal_id;

    [프로그래머스, 131123] 즐겨찾기가 가장 많은 식당 정보 출력하기 (mysql)

    https://school.programmers.co.kr/learn/courses/30/lessons/131123 프로그래머스코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.programmers.co.krSELECT food_type, rest_id, rest_name, favoritesFROM rest_infoWHERE(food_type, favorites) IN ( SELECT food_type, MAX(favorites) FROM rest_info GROUP BY food_type)ORDER BY food_type DESC;