Airbnb Interview Question: Sort a list of numbers in whi... | Glassdoor

Find your next job here

Interview Question

Software Engineer Interview San Francisco, CA

Sort a list of numbers in which each number is at a

  distance k from its actual position

Interview Answer

1 Answer



Use a heap of size k and sort the results. Run time : nlogk on May 14, 2015

Add Answers or Comments

To comment on this, Sign In or Sign Up.