19

Given some input array a = [a1, a2, ..., an] and a positive integer k, shuffle the input array a such that no entry is farther than k from its initial position.
Example
Given the array [1, 2, 3, 4, 5, 6] and k = 1, this means the entry 3 can be at following positions:
[*, 3, *, *, * ,*]
[*, *, 3...