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
- Content Compression Resistance priority
- endpoint
- coordinator
- 백준
- 알고리즘
- ai expo
- RX
- RxSwift요약
- IOS
- Autolayout
- LLM
- 오토레이아웃
- 자료구조
- 병합정렬
- Content Hugging priority
- 동작과정
- mvvm
- Union-Find
- RxCocoa
- rxswift
- uikit
- swift알고리즘
- 선택정렬
- swift
- 삽입정렬
- ReactiveX
- GCD
- OperationQueue
- 버블정렬
- 동시성프로그래밍
Archives
- Today
- Total
JosephCha의 개발일지
백준/2920번/음계 문제 본문
반응형
let input = readLine()!.split(separator: " ")
if input == input.sorted() {
print("ascending")
} else if input == input.sorted(by: >) {
print("descending")
} else {
print("mixed")
}
설명
- ascending일 경우는 즉 오름차수로 정렬된 상태
- dscending일 경우는 즉 내림차수로 정렬된 상태
- 나머지는 mixed
'알고리즘 및 자료구조' 카테고리의 다른 글
[스택] 백준/1874번/스택 수열 (0) | 2022.07.27 |
---|---|
[브루트 포스]백준/2798번/블랙잭 (0) | 2022.07.26 |
큐 (0) | 2022.04.20 |
스택 (0) | 2022.04.20 |
이진탐색 (0) | 2022.04.20 |
Comments