LeetCode interview question

i had greedy algorithm questions