Core idea
Sorting changes the shape of a problem. Searching uses that shape to avoid checking every item.
Before coding, ask: can sorted order remove choices, reveal duplicates, or make yes/no decisions monotonic?
When sorting helps
In placement rounds, sorting is often the first move when order does not matter in the final answer. It helps with duplicates, intervals, pairing, closest values, and ranking.
Sorting costs time, usually O(n log n). That is fine if it makes the rest of the solution simple and correct.