I don't remember exactly: Write a function taking a sorted array of preferences. Return them squared - they should be in order higher to lower.
Anonymous
The main diffucuclcy was to note that the values might negative. Used stack.
Check out your Company Bowl for anonymous work chats.