Squares of a Sorted Array
-
[leetcode] 977. Squares of a Sorted Array알고리즘 2021. 11. 6. 15:51
Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com [Success] 내림차순으로 정렬된 정수 배열이 주어졌을 때, 내림차순으로 정렬된 각 인덱스 값의 제곱 구하는 문제 [풀이] 각 인덱스의 값의 제곱을 구한 후 해당 인덱스에 다시 할당시킨다. 제곱의 값으로 다 채워진 후에는 해당 배열을 내림차순으로 정렬. class Solution { public int..
-
[leetcode] Squares of a Sorted Array알고리즘 2021. 9. 3. 22:49
https://leetcode.com/explore/learn/card/fun-with-arrays/523/conclusion/3574/ Explore - LeetCode LeetCode Explore is the best place for everyone to start practicing and learning on LeetCode. No matter if you are a beginner or a master, there are always new topics waiting for you to explore. leetcode.com Success 오름차순으로 정렬된 배열이 주어졌을 때 , 각 원소의 값을 제곱한 후 오름차순 되어 있는 상태로 반환 해야한다. 풀이 각 원소에 값을 제곱을 하여 새로 값..