Notice
Recent Posts
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- 우분투
- 금융문자분석경진대회
- Baekjoon
- 데이콘
- github
- Real or Not? NLP with Disaster Tweets
- 파이썬
- leetcode
- 프로그래머스
- Kaggle
- PYTHON
- Docker
- ubuntu
- 자연어처리
- dacon
- 편스토랑
- 프로그래머스 파이썬
- 캐치카페
- ChatGPT
- 백준
- 더현대서울 맛집
- 편스토랑 우승상품
- 코로나19
- 맥북
- hackerrank
- Git
- gs25
- programmers
- AI 경진대회
- SW Expert Academy
Archives
- Today
- Total
목록
반응형
Minimum Swaps 2 (1)
반응형
솜씨좋은장씨
[HackerRank] Arrays: Minimum Swaps 2 (Python)
You are given an unordered array consisting of consecutive integers [1, 2, 3, ..., n] without any duplicates. You are allowed to swap any two elements. You need to find the minimum number of swaps required to sort the array in ascending order. For example, given the array arr = [ 7, 1, 3, 2, 4, 5, 6, ] we perform the following steps: i arr swap (indices) 0 [7, 1, 3, 2, 4, 5, 6] swap (0,3) 1 [2, ..
Programming/코딩 1일 1문제
2020. 3. 11. 13:17
반응형