Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array is formatted like this:
- array[0,0]=THE X OF THE FIRST POSITION
- array[0,1]=THE Y OF THE FIRST POSITION
- the goal is to sort array so that
- array[1,0],array[1,1]=THE CLOSEST POSITION TO array[0,0],array[0,1]
- And so on.
- SAMPLE START:
- array[0,0]=10
- array[0,1]=10
- array[1,0]=0
- array[1,1]=0
- array[2,0]=5
- array[2,1]=5
- SAMPLE FINISH:
- array[0,0]=10
- array[0,1]=10
- array[1,0]=5
- array[1,1]=5
- array[2,0]=0
- array[2,1]=0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement