![](http://i1.daumcdn.net/thumb/C148x148.fwebp.q85/?fname=https://blog.kakaocdn.net/dn/bztGTw/btsrgje2mkm/TrDJgyDfvvbuWTnlXdbQrk/img.png)
https://leetcode.com/problems/valid-anagram/ 내 풀이 class Solution { func isAnagram(_ s: String, _ t: String) -> Bool { var sortedS = s.sorted() var sortedT = t.sorted() return sortedS == sortedT ? true : false } } Solution().isAnagram("anagram", "nagaram") s, t를 정렬해서 두 string의 순서들을 똑같이 만듬. `==` (비교연산자)를 사용해 s, t를 비교하여 같으면 true를, 다르면 false를 리턴 다른사람의 풀이 class Solution { func isAnagram(_ s: String, ..
알고리즘
2023. 8. 16. 08:53
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
TAG
- RTCCameraVideoCapturer
- swift property
- Swift 알고리즘
- Swift inout
- swift programmers
- CS 네트워크
- Combine: Asynchronous Programming with Swift
- Swift init
- swift reduce
- Swift 내림차순
- Swift final
- Swift 프로퍼티
- Class
- 원티드 프리온보딩
- Swift ModernRIBs
- ios
- iOS error
- Swift joined
- Swift Leetcode
- 2023년 회고
- RIBs tutorial
- swift (programmers)
- swift 고차함수
- Swift joined()
- Swift
- Swift RIBs
- Swift 프로그래머스
- removeLast()
- Swift Error Handling
- swift protocol
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
글 보관함