public PriorityQueue(T root, Comparison <T> comparison) { stack = new StackByResizeableArray <T>(); stack.Push(default);
StackByResizeableArray <int> stack;// where the data is stored //Left child of stack[i]: stack[2*i] //Right child of stack[i]: stack[2*i+1] BinaryHeap(int root) { stack = new StackByResizeableArray <int>(); stack.Push(0); stack.Push(root); }