We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Data Structures
- Heap
- Jesse and Cookies
- Discussions
Jesse and Cookies
Jesse and Cookies
Sort by
recency
|
360 Discussions
|
Please Login in order to post a comment
The example might have an error after [16,8,7,6], the next iteration should return a smaller array i.e. [20,16,8], but it still includes the 7 which should've been extracted.
Here is my solution. It uses python heapq library. It is fast