So-Far Interview Question

Sorting and range display algorithm