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 | 31 |
Tags
- 더현대서울 맛집
- Git
- 편스토랑 우승상품
- 캐치카페
- 백준
- Real or Not? NLP with Disaster Tweets
- PYTHON
- leetcode
- SW Expert Academy
- 편스토랑
- 파이썬
- 코로나19
- 프로그래머스 파이썬
- 프로그래머스
- ubuntu
- dacon
- 맥북
- Kaggle
- gs25
- 우분투
- AI 경진대회
- Baekjoon
- 자연어처리
- github
- programmers
- Docker
- hackerrank
- 금융문자분석경진대회
- 데이콘
- ChatGPT
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
반응형