Last active
June 23, 2020 04:02
-
-
Save jwasinger/8d08281ed90b81da16968a452a12d3a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for i in [0..vec.len]: | |
vec[i] = vec[i] * vec[i] | |
return sorted(vec) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is what I got so far:
class Solution {
public:
vector sortedSquares(vector& A) {
for (unsigned int i = 0; i < A.size(); i++)
A[i] = A[i] * A[i];
};