최대 힙(Max Heap)

    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/19 (목) 원점에 가장 가까운 K개의 점 TIL

    공부한 것LeetCode #973. K Closest Points to OriginLeetCode - 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/k-closest-points-to-origin/description/⇒ 좌표 평면에 흩어져 있는 점들의 위치[x,y]가 주어졌을 때 원점에 가장 가까운 k개의 점들을 따로 모아 반환하는 문제였다. Map..

    10/18 (수) 마지막 남은 돌멩이의 무게(최대 힙 구현) TIL

    공부한 것LeetCode #1046. Last Stone WeightLast Stone Weight - LeetCodeCan you solve this real interview question? Last Stone Weight - You are given an array of integers stones where stones[i] is the weight of the ith stone. We are playing a game with the stones. On each turn, we choose the heaviest two stones and smash them together. Suppose the heaviest two stones have weights x and y with x