Lazy Selection Sort
Lazy Selection Sort Lazy selection sort produces sorted output incrementally. Instead of sorting the entire array, it finds the next smallest element only when requested. You use it when you need a few smallest elements or when output is consumed step by step. Problem Given an array ( A ), support an operation: next() that returns the next smallest element without sorting the entire array in advance. Idea Keep track...