Amazon coding interview question - challenge for everyone
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.
You are viewing a single comment. View All