Problem
This problem was asked by Google.
Given a sorted list of integers, square the elements and give the output in sorted order.
For example, given [-9, -2, 0, 2, 3], return [0, 4, 4, 9, 81].
——————————————————————————————————————
To get access to the solution for this problem (and high-quality breakdowns of many other problems), subscribe to the publication right here. To get the solution to this problem, sign up for the advanced version of my newsletter right here. Join various other coders nailing interviews at top-tier firms such as Facebook, Microsoft, Google, Fidelity, and more:
To share interesting problems/solutions with me, reach out to me. Good problems and/or solutions receive a free shoutout + 2 months of the paid newsletter:
https://www.instagram.com/iseethings404/
https://twitter.com/Machine01776819
https://www.linkedin.com/in/devansh-devansh-516004168/