What you learned from this problem:
Sorting is often the first step in greedy. The right sort order is the core idea.
Two-pointer technique pairs naturally with greedy on sorted arrays.
Match "smallest sufficient" to avoid wasting resources.
Exchange argument proves optimality: show that any other solution can be converted to greedy without losing quality. You will see these patterns repeatedly in greedy problems. The exchange argument proves correctness formally. Without it, you are just guessing that greedy works. Always attempt a proof before submitting.