일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- recyclerview
- 코딩테스트
- 다시 정리해야함
- 알고리즘 인증_1주차
- filternot
- 코틀린
- 알고리즘 인증
- 다시정리하기
- Filter
- 취준기록
- 알고리즘 인증_2주차
- 다시봐
- iPortfolio
- foldindexed
- array랑 list
Archives
- Today
- Total
목록다시정리하기 (1)
Moments of growth
[Lv1 Kotlin] x만큼 간격이 있는 n개의 숫자
[내 코드] class Solution { fun solution(x: Int, n: Int): LongArray { var answer = longArrayOf() for(i in 1..n){ answer += (x.toLong()*i) } return answer } } [다른 사람 풀이] class Solution { fun solution(x: Int, n: Int): LongArray = LongArray(n) { x.toLong() * (it + 1) } } var a = IntArray(2){ it } a는 [0,1]
카테고리 없음
2022. 9. 18. 02:08