Mock technical interviews with an AI interviewer.
Every problem leaves something out. Ask about it before you code.
Problems
- Insert Into a Min-HeapAn array holds a binary min-heap. Insert a new value into the heap in place: the function returns nothing, and the examples show the array afterwards.EasyHeapsHeaps
- Is the Array a Max-Heap?An array of integers is supposed to store a binary max-heap. Return whether it really is one.EasyHeapsHeaps
- Is the Array a Min-Heap?Given an array of integers, return whether it is a valid binary min-heap.EasyHeapsHeaps
- Kth Largest With a HeapGiven an array of integers and an integer k, return the kth largest element, where k = 1 means the largest.MediumHeapsHeaps
- Remove the Minimum From a HeapAn array holds a binary min-heap, with the root at index 0 and the children of index i at 2i + 1 and 2i + 2. Remove the smallest value from the heap in place: the function returns nothing, and the examples show the array that remains.MediumHeapsHeaps