Skip to content
Advertisement

Problem: Squares of a Sorted Array | Can anyone lookout this code [closed]

Can anyone recorrect this code? Code is not working properly. The output should be a square sorted array. Example :Input: [-4,-1,0,3,10] Output: [0,1,9,16,100] I’m using Leetcode platform.

JavaScript

Advertisement

Answer

Accepted solution:

JavaScript

If you still want to do like yours check if this can help:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement