Deepak and his journey Greedy Problem

Given wrong answer. Is it a right approach for this particular problem?

this is perfectly fine approach, try submitting again.

yeah…i have solved it before so it’s just a thread that TA took it but never replied back then, so I created another.
You seem new here!