euisblue
.about
.project
.blog
.cp
.dsa
.about
.project
.blog
.cp
.dsa
977. Squares of a Sorted Array
C++
1
def
sorted_squares
(
nums
)
2
nums
.
map
!
{
|
x
|
x
*
x
}
3
nums
.
sort
4
end