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 |
Tags
- 알고리즘
- axios
- 자바
- Python
- JavaScript
- redux-saga
- 항해99
- 코딩테스트합격자되기
- 리액트
- useDispatch
- programmers
- redux-toolkit
- SW
- 항해플러스
- react
- 테코테코
- sw expert academy
- createSlice
- json-server
- 매일메일
- C++
- 이코테
- redux
- maeil-mail
- java
- react-router
- Get
- Algorithm
- react-redux
- 프로그래머스
Archives
- Today
- Total
목록문자열 내 마음대로 정렬하기 (1)
Binary Journey

출처: 프로그래머스 코딩 테스트 연습, https://programmers.co.kr/learn/challenges 문제는 이렇다. ** Javascript function solution(strings, n) { return strings.sort((a, b) => a[n].localeCompare(b[n]) || a.localeCompare(b)); } 문제 풀다보면 javascript 능력자들의 코드들을 볼 수 있는데 드디어 나도!!! 한 줄의 간지를 드디어 해봤다! 다른 사람 풀이 중에 내 풀이랑 같은 건 아직 없는 것 같다! ^_____________________________^ localeCompare 도 이번에 처음 알았다. String.prototype.localeCompare() The..
프로그래머스/level 1
2021. 7. 21. 21:43