Domanda di colloquio di MongoDB

How to square integers in array and keep it sorted