Skip to main content

Practice ยท 2 of 3

Sort by rule, not by loop

Using a lambda or method reference (no manual loop): return the words sorted by length, shortest first; same-length words keep alphabetical order.

Difficulty: intermediate

Back to lesson: Practice: Practice: Pipelines at Work