Skip to main content

Checkpoint: sort by key digit

Challenge on lesson: Checkpoint: sort by key

CHALLENGE
Difficulty: beginner+25 XP

Implement int[] sortNames(int[] keys): return a new array sorted ascending by the last digit (value % 10); ties keep original order (stable โ€” insertion sort does this naturally). keys is non-empty.

Back to lesson: Checkpoint: sort by key