Skip to content

Commit 72f4a47

Browse files
jwPark6qkrwldn054Panquesito7
authored
Korean translation (#157)
* Korean translation of Circular Linked List * Korean translation of Floyd Cycle Detection Algorithm * Update ko/자료구조/연결 리스트/원형 연결 리스트.md Co-authored-by: David Leal <[email protected]> * Update ko/탐색/플로이드 순환 탐색 알고리즘.md * Update 원형 연결 리스트.md Translation of Video explanation on YouTube * Update 원형 연결 리스트.md Co-authored-by: jwPark6 <[email protected]> Co-authored-by: David Leal <[email protected]>
1 parent addcea6 commit 72f4a47

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

ko/자료구조/연결 리스트/원형 연결 리스트.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737

3838
### SLL v.s. CLL
3939

40-
![image](https://i0.wp.com/algorithms.tutorialhorizon.com/files/2016/03/Circular-Linked-List.png)
40+
![영상](https://i0.wp.com/algorithms.tutorialhorizon.com/files/2016/03/Circular-Linked-List.png)
4141

4242
### 예시
4343

@@ -72,4 +72,4 @@ public void insertHead(int data)
7272

7373
## 영상 URL
7474

75-
[Video explanation on YouTube](https://youtu.be/HMkdlu5sP4A)
75+
[유투브 영상](https://youtu.be/HMkdlu5sP4A)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# 배열에서 중복 번호를 찾는 플로이드 순환 탐색 알고리즘
2+
3+
## 문제
4+
5+
`n + 1` 정수를 포함하는 정수 배열이 주어지면 각 정수는 `[1, n]`을 포함한 범위에 있다. 입력 배열에 중복 숫자가 하나만 있으면 이 알고리즘은 원래 배열을 수정하지 않고 중복 숫자를 반환하고, 그렇지 않으면 `-1`을 반환한다.
6+
7+
## 접근 방식
8+
9+
10+
- 함수 `f(x) = arr[x]`를 사용하여 시퀀스를 구성한다.
11+
<예시> `arr[0]`, `arr[arr[0]]`, `arr[arr[arr[0]]]`, `arr[arr[arr[arr[0]]]]`
12+
- 시퀀스의 각각의 새로운 원소는 이전 요소의 인덱스에 있는 `arr[]`의 원소입니다.
13+
- `x = arr[0]`부터 시작하여 원형 연결 리스트를 생성한다.
14+
- `arr[]`에 중복 원소(최소 하나)가 포함되어 있기 때문에 `cycle`이 나타난다. 중복 값은 순환의 시작점이다.
15+
16+
## 시간 복잡도
17+
18+
O(n)
19+
20+
## 공간 복잡도
21+
22+
O(1)
23+
24+
## 예시
25+
26+
```
27+
arr = [3, 4, 8, 5, 9, 1, 2, 6, 7, 4]
28+
29+
return value = 4
30+
```
31+
32+
## 구현
33+
34+
- [C++](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/search/floyd_cycle_detection_algo.cpp)
35+
- [C](https://github.com/TheAlgorithms/C/blob/master/searching/floyd_cycle_detection_algorithm.c)
36+
37+
#### 영상 URL
38+
39+
[플로이드 순환 탐색 알고리즘 유투브 영상](https://www.youtube.com/watch?v=B6smdk7pZ14)

0 commit comments

Comments
 (0)