AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
How to Find the Maximum Overall for the Heap Solution
I think the heap can be done in just linear time, order of a. And it's not, it's not using like O of one time on each step. So this solution you're describing is big, big O of a. The array solution would be O of a times log of k. But I mean, so I know eventually the O of k solution has to beat the O of there's.