Amazon Interview Question

sorted array rotated k times implementing heap data structure