Thoughtworks Interview Question

Algorithm implementation for sort logic