Solution #1: Creating a Max-Heap and removing max kk times

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.