최소 힙(Min Heap)

    11/2 (목) 쿼리를 포함하기 위한 최소 인터벌 TIL

    공부한 것LeetCode #1851. Minimum Interval to Include Each QueryMinimum Interval to Include Each Query - LeetCodeCan you solve this real interview question? Minimum Interval to Include Each Query - You are given a 2D integer array intervals, where intervals[i] = [lefti, righti] describes the ith interval starting at lefti and ending at righti (inclusive). The size of an interval is defined as the num..

    10/23 (월) (완료)스트림에서 중위값 찾기 TIL

    공부한 것LeetCode #295. Find Median from Data StreamFind Median from Data Stream - LeetCodeCan you solve this real interview question? Find Median from Data Stream - The median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value, and the median is the mean of the two middle values. * For example, for arr = [2,3,4], the median is 3. * For example,..

    10/17 (화) 배열에서 K번째로 큰 수 찾기(최소 힙 구현) TIL

    공부한 것LeetCode #215. Kth Largest Element in an ArrayKth Largest Element in an Array - LeetCodeCan you solve this real interview question? Kth Largest Element in an Array - Given an integer array nums and an integer k, return the kth largest element in the array. Note that it is the kth largest element in the sorted order, not the kth distinct element. Can you solve it without sorting? Example 1: ..

    10/16 (월) 스트림에서 K번째로 큰 수 찾기(최소 힙 구현) + 우선순위 큐 개괄 TIL

    공부한 것LeetCode #703. Kth Largest Element in a StreamLeetCode - The World's Leading Online Programming Learning PlatformLevel 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.https://leetcode.com/problems/kth-largest-element-in-a-stream/description/자바스크립트의 sort()을 이용한 풀이와 최소 힙(Min Heap)을 구현해서 푼 풀이의 결과 차이가 엄청나다: 번..