no image
프로그래머스 21kakao_blind 순위검색(python)
https://school.programmers.co.kr/learn/courses/30/lessons/72412 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr from bisect import bisect_left def solution(info, query): a = {"java":"0", "cpp":"1", "python":"2"} b = {"backend":"0", "frontend":"1"} c = {"junior":"0", "senior":"1"} d = {"chicken":"0", "pizza":"1"} results = [] for i in..
2024.03.28
no image
릿코드 2. Add Two Numbers, 49. Group Anagrams
문제 2. https://leetcode.com/problems/add-two-numbers/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 문제에서 제시한 singly-linked list 구조에 맞춰 알고리즘을 풀어나가는 문제였다. 처음에 순서를 ..
2024.02.17
no image
릿코드 134. Gas Station, 135. Candy
문제 134. https://leetcode.com/problems/gas-station/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 135. https://leetcode.com/problems/candy/description/?envType=stud..
2024.02.09
no image
릿코드 238. Product of Array Except Self
문제 https://leetcode.com/problems/product-of-array-except-self/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 나누기를 하지 않고 O(n) 연산을 하라는 것에 아이디어가 안떠올랐다. Discussion ..
2024.02.06
no image
릿코드 45. Jump Game II
문제 링크 https://leetcode.com/problems/jump-game-ii/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 $ \bullet $ 마지막 인덱스에 도달할 수 없는 case는 없다. $ \bullet $ 그래서, (마지막 인덱..
2024.02.04
no image
릿코드 55. Jump Game
문제 https://leetcode.com/problems/jump-game/description/?source=submission-noac LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 접근 DP를 생각했다. $ A_{n} $까지 점프할 수 있는 $ A_{n-1}, A_{n-4}, A_{n-7} .... $ 이 있다면 $ A_{n-1} $까지 점프할 수 있..
2024.02.02
no image
릿코드 121. Best Time to Buy and Sell Stock
문제 https://leetcode.com/problems/best-time-to-buy-and-sell-stock/description/?envType=study-plan-v2&envId=top-interview-150 LeetCode - The World's Leading Online Programming Learning Platform Level up your coding skills and quickly land a job. This is the best place to expand your knowledge and get prepared for your next interview. leetcode.com 저점(buy), 고점(sell)을 변수로 두고 생각했는데 O(n^2) 밖에 안떠올랐고 Dis..
2024.02.01