Sort an array in ascending order using a single for loop
Filed under Hexaview
The question
Write a program to sort an array of integers in ascending order restricting the implementation to using only a single for loop.
No write-up yet. Related questions below have one.
Related Hexaview questions
Collected from public candidate posts and coding forums. Updated Nov 2026.