Difficulty Level: MEDIUM
Problem Statement:
Given an array of N elements, where each element is at most K away from its target position, devise an algorithm that sorts in O(N log K) time.
Input:
arr[] = { 1, 2, 6, 8 }, low = 1, high = 10
Output:
3 4 5 7 9 10