A shorter method isn't automatically an improvement. During a code review, identify its accepted inputs, outputs, mutations, exceptions, and ownership rules before changing its shape. Those rules are what callers depend on. Tests should expose a broken rule rather than require a preferred arrangement of syntax. Use the Try pattern for expected parse failures. Keep validation separate from a business decision so one branch doesn't accidentally bypass another. A query should not sort a caller-owned collection in place unless the contract promises that mutation. When you catch exceptions, catch the category you can handle and preserve cancellation.
These exercises begin with a clear contract and let you choose a readable implementation. Switch expressions, LINQ, guards, and loops are options, not grading keywords. The hidden inputs cover the boundaries that an attractive refactor can quietly change, including an inclusive threshold and the last retry.
The query names both ordering rules and returns new output without sorting the caller's list.