imma aboutta get piped so grinding 'em leetcodes... tryna get the runtime on this one down to O(n) any ideas? https://leetcode.com/discuss/interview-question/339640/SAP-or-Online-Assessment-or-Minimum-Sum
Fitness
Yesterday
1106
how can i loose 5 pounds with small changes to lifestyle
Tech Industry
Yesterday
2866
Google giving meals. Meanwhile Amazon L8 “don’t take more than one fruit”
Tech Industry
Yesterday
511
How much down Tesla will be after earning
India
Yesterday
243
Duniya me Vishwaguru ka Danka
Personal Finance
Yesterday
3526
Is it cheaper to eat chipotle everyday than buy groceries ?
Don’t think you can do O(n), just use max heap and keep popping / pushing? Should be K log N
Building heap is O(NlgN)
https://www.growingwiththeweb.com/data-structures/binary-heap/build-heap-proof/ this says otherwise ? Each pop is log N and we are doing it K times