Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
Tags
- join
- Python
- decorator
- len
- enumerate
- list
- split
- iNT
- STR
- WECODE
- map
- js
- LOWER
- and
- count
- 파이썬
- or
- lambda
- Sorted
- sum
- Algorithm
- FOR
- MAX
- If
- DART
- SQL
- index
- range
- 위코드
- slice
Archives
- Today
- Total
목록DART (23)
코드로 우주평화
1117. Reverse List Order
In this kata you will create a function that takes in a list and returns a list with the reverse order. Examples (Input -> Output) * [1, 2, 3, 4] -> [4, 3, 2, 1] * [9, 2, 0, 7] -> [7, 0, 2, 9] Solution: List reverseList(List list) { return list.reversed.toList(); } List reverseList(List list)=>[...list.reversed]; List reverseList(List list) => List.from(list.reversed);
나는 이렇게 학습한다/Algorithm & SQL
2022. 11. 17. 23:51
1116. Convert boolean values to strings 'Yes' or 'No'.
Complete the method that takes a boolean value and return a "Yes" string for true, or a "No" string for false. Solution: String bool_to_word(bool boolean) { String result = "No"; if (boolean == true) { result = "Yes"; } return result; } // or String bool_to_word(bool boolean) => boolean ? "Yes" : "No";
나는 이렇게 학습한다/Algorithm & SQL
2022. 11. 17. 01:26