Amazon coding interview question - challenge for everyone
h
rafrafraf (1389)

what is the challenge?

  • make a program that takes a list of positions in (x, y) format.
  • it should then return the K closest positions to (0, 0).
  • you can use any list of positions and any k you like.

i have two solutions, the first is simpler but less efficient than the second.

if you finish it and want to challenge yourself further, try make it as time efficient as you can.

goodluck!

You are viewing a single comment. View All
rafrafraf (1389)

@ObiVibKenobi great! i plan on doing a daily challenge, atleast for as long as i can find good ones