public static int FindKthLargest(int[] nums, int k) {
IntervalHeap<int> heap = new IntervalHeap<int>();
for (var i = 0; i < n; i++){
if (nums[i] > heap.FindMin()){
for (var i = 0; i < n; i++){
if (nums[i] < heap.FindMax()){
public static void Main()
var nums = new int[6]{3,2,1,5,6,4};
Console.WriteLine(FindKthLargest(nums, k));
Console.WriteLine(FindKthLargest(nums, k));