Whatnot Interview Question

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.

Interview Answer

Anonymous

Jul 25, 2023

The main diffucuclcy was to note that the values might negative. Used stack.