250x250
반응형
Notice
Recent Posts
Recent Comments
Link
목록우선순위 (1)
N
(Leet Code JS)Furthest Building You Can Reach
https://leetcode.com/problems/furthest-building-you-can-reach/ Furthest Building You Can Reach - LeetCode 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 최소힙을 이용한 문제풀이. 벽돌과 사다리를 이용해 가장 멀리 갈 수 있는 빌딩의 인덱스를 리턴하면 된다. pq라는 이름으로 우선순위 큐(최소 힙)을 선언한다. for문으로 1부터 heights의 길이만큼 순회. 현재 빌딩의 높이 - 이전 빌딩의 ..
Leet Code 알고리즘
2022. 7. 3. 19:24