find_running_median
-
[자료구조] [heap] 업데이트 되는 array값의 중앙값 구하기Data miner/Algorithm & Data structure 2020. 3. 3. 17:33
Hackerrank의 Data structures 관한 문제 중에서 Hard에 속하는 문제이다. 원 문제 링크는 다음을 따라가보자. https://www.hackerrank.com/challenges/find-the-running-median/problem?h_r=internal-search Find the Running Median | HackerRank Find the median of the elements after inputting each element. www.hackerrank.com 연속적으로 주어지는 배열의 평균값들을 반복적으로 구하는 문제이다. [12,4,5,3,8,7]이 주어지면 앞에서부터 한 개씩 차례대로 추가하여 추가된 값들까지의 중앙값을 구하고, 이들이 포함된 리스트를 구하면 ..