Friday, November 27, 2015

Airbnb: K-distance sort

Sort a list of numbers in which each number is at a distance k from its actual position.



1 comment:

  1. Shouldn't it be 'at most k' from its actual position? If it's just k, then it's rotated sorted array.

    ReplyDelete