๋ฌธ์
๊ฒฐ๊ณผ
๋์ ํฉ
- answer ์ด๊ธฐํ๋ฅผ ์์ฃผ ํฐ ๊ฐ์ผ๋ก ํด๋์ผ ํ๊ณ (Math.abs(sum[A.length])๋ก ํ๋๊น ํ๋ ธ์๋ค.)
- 1 ~ A.length -1 ๊น์ง sum[i]๋ฅผ ํ์ฉํด์ ์ฐจ์ด๋ฅผ ๊ตฌํด์ผ ์ ๋ต์ด๋ค. A.length๊น์ง ๊ตฌํ๋ฉด ๋ ํ๋ฆผ..;
์ธํฐ๋ท ๊ฒ์ํ๋ฉด ์๋์ ๊ฐ์ ํ์ด๋ ์์
'๐ฅ PS(Problem Solving) ๐ฅ > Codility' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[Codility] Lesson 4 Counting Elements : MaxCounters (0) | 2021.04.15 |
---|---|
[Codility] Lesson 4 Counting Elements : FrogRiverOne (0) | 2021.04.07 |
[Codility] Lesson 3 Time Complexity : PermMissingElem (0) | 2021.04.06 |
[Codility] Lesson 3 Time Complexity : FrogJmp (0) | 2021.04.05 |
[Codility] Lesson 2 Arrays : OddOccurrencesInArray (0) | 2021.04.05 |
๋๊ธ