Hello,
I find myself very bad at greedy-algorithms and greedy-problems. I have found an easy problem online I have not been succesful myself in solving:
I am not confident in how to get to this problem.
My current idea is to sort the array according to height, and if height is equal then according to k. But I am not sure where to go on from here. Any help is appreciated greatly.