Skip to content

Commit 7c453db

Browse files
author
이준헌
authored
Added Korean translation (#163)
1 parent bafa701 commit 7c453db

22 files changed

+978
-113
lines changed

Diff for: en/Data Structures/Graph/Bellman-Ford.md

+39-39
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Given a weighted directed graph G(V,E) and a source vertex s ∈ V, determine fo
1111
- Create an array dist[] of size |V| with all values as infinite except dist[s].
1212
- Repeat the following |V| - 1 times. Where |V| is number of vertices.
1313
- Create another loop to go through each edge (u, v) in E and do the following:
14-
1. dist[v] = minimum(dist[v], dist[u] + weight of edge).
14+
1. dist[v] = minimum(dist[v], dist[u] + weight of edge).
1515
- Lastly iterate through all edges on last time to make sure there are no negatively weighted cycles.
1616

1717
#### Time Complexity
@@ -30,52 +30,52 @@ O(V^2)
3030

3131
```
3232
# of vertices in graph = 5 [A, B, C, D, E]
33-
# of edges in graph = 8
33+
# of edges in graph = 8
3434
3535
edges [A->B, A->C, B->C, B->D, B->E, D->C, D->B, E->D]
3636
weight [ -1, 4, 3, 2, 2, 5, 1, -4 ]
3737
source [ A, A, B, B, B, D, D, E ]
3838
3939
4040
41-
// edge A->B
42-
graph->edge[0].src = A
43-
graph->edge[0].dest = B
44-
graph->edge[0].weight = -1
45-
46-
// edge A->C
47-
graph->edge[1].src = A
48-
graph->edge[1].dest = C
49-
graph->edge[1].weight = 4
50-
51-
// edge B->C
52-
graph->edge[2].src = B
53-
graph->edge[2].dest = C
54-
graph->edge[2].weight = 3
55-
56-
// edge B->D
57-
graph->edge[3].src = B
58-
graph->edge[3].dest = D
59-
graph->edge[3].weight = 2
60-
61-
// edge B->E
62-
graph->edge[4].src = B
63-
graph->edge[4].dest = E
64-
graph->edge[4].weight = 2
65-
66-
// edge D->C
41+
// edge A->B
42+
graph->edge[0].src = A
43+
graph->edge[0].dest = B
44+
graph->edge[0].weight = -1
45+
46+
// edge A->C
47+
graph->edge[1].src = A
48+
graph->edge[1].dest = C
49+
graph->edge[1].weight = 4
50+
51+
// edge B->C
52+
graph->edge[2].src = B
53+
graph->edge[2].dest = C
54+
graph->edge[2].weight = 3
55+
56+
// edge B->D
57+
graph->edge[3].src = B
58+
graph->edge[3].dest = D
59+
graph->edge[3].weight = 2
60+
61+
// edge B->E
62+
graph->edge[4].src = B
63+
graph->edge[4].dest = E
64+
graph->edge[4].weight = 2
65+
66+
// edge D->C
6767
graph->edge[5].src = D
68-
graph->edge[5].dest = C
69-
graph->edge[5].weight = 5
70-
71-
// edge D->B
68+
graph->edge[5].dest = C
69+
graph->edge[5].weight = 5
70+
71+
// edge D->B
7272
graph->edge[6].src = D
73-
graph->edge[6].dest = B
74-
graph->edge[6].weight = 1
75-
76-
// edge E->D
73+
graph->edge[6].dest = B
74+
graph->edge[6].weight = 1
75+
76+
// edge E->D
7777
graph->edge[7].src = E
78-
graph->edge[7].dest = D
78+
graph->edge[7].dest = D
7979
graph->edge[7].weight = -3
8080
8181
for source = A
@@ -86,8 +86,7 @@ O(V^2)
8686
C 2 A->B->C = -1 + 3
8787
D -2 A->B->E->D = -1 + 2 + -3
8888
E 1 A->B->E = -1 + 2
89-
```
90-
89+
```
9190

9291
#### Code Implementation Links
9392

@@ -103,5 +102,6 @@ O(V^2)
103102
#### Others
104103

105104
Sources Used:
105+
106106
- https://www.geeksforgeeks.org/bellman-ford-algorithm-dp-23/
107107
- https://en.wikipedia.org/wiki/Bellman%E2%80%93Ford_algorithm

Diff for: ko/기초 수학/등비수열.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
**등비수열의 n번째 항 공식:**
2525

26-
`a`가 초항이고, `r`이 공비일 때, n번째 항은:
26+
<img src="https://render.githubusercontent.com/render/math?math=a">가 초항, <img src="https://render.githubusercontent.com/render/math?math=r">이 공비일 때, <img src="https://render.githubusercontent.com/render/math?math=n">번째 항은:
2727

2828
<p align="center">
2929
<img width="60%" src="https://user-images.githubusercontent.com/75872316/122635586-6fc12200-d102-11eb-9a87-333c9a578cc8.png">
@@ -37,13 +37,11 @@
3737

3838
**등비수열에 관련된 문제를 풀기 위한 일반적인 공식:**
3939

40-
`a`가 초항, `r`이 공비일 때:
40+
<img src="https://render.githubusercontent.com/render/math?math=a">가 초항, <img src="https://render.githubusercontent.com/render/math?math=r">이 공비일 때:
4141

42-
- 등비수열의 n번째 항 = `a * r^(n-1)`.
43-
- 기하평균 = `n개 항의 곱의 n제곱근`.
44-
- 등비급수 (r < 1) = `[a (1 – r^n)] / [1 – r]`.
45-
- 등비급수 (r > 1) = `[a (r^n – 1)] / [r – 1]`.
46-
- 무한등비급수 (r < 1) = `(a) / (1 – r)`.
42+
- 등비급수 (r < 1) = <img src="https://render.githubusercontent.com/render/math?math=\frac{a(1-r^n)}{1-r}">
43+
- 등비급수 (r > 1) = <img src="https://render.githubusercontent.com/render/math?math=\frac{a(r^n-1)}{r-1}">
44+
- 무한등비급수 (r < 1) = <img src="https://render.githubusercontent.com/render/math?math=\frac{a}{1-r}">
4745

4846
## 영상 URL
4947

Diff for: ko/기초 수학/등차수열.md

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
**등차수열의 n번째 항 공식:**
1818

19-
`a`가 초항이고, `d`가 공차일 때, n번째 항은:
19+
<img src="https://render.githubusercontent.com/render/math?math=a">가 초항, <img src="https://render.githubusercontent.com/render/math?math=d">가 공차일 때, <img src="https://render.githubusercontent.com/render/math?math=n">번째 항은:
2020

2121
<p align="center">
2222
<img width="60%" src="https://user-images.githubusercontent.com/75872316/122635193-25d73c80-d100-11eb-9015-344d36633704.png">
@@ -30,11 +30,10 @@
3030

3131
**등차수열에 관련된 물제를 풀기 위한 일반적인 공식:**
3232

33-
`a`가 초항, `d`가 공차일 때:
33+
<img src="https://render.githubusercontent.com/render/math?math=a">가 초항, <img src="https://render.githubusercontent.com/render/math?math=d">가 공차일 때:
3434

35-
- 등차수열의 n번째 항 = `a + d*(n-1)`.
36-
- 산술평균 = `전체 항의 합 / 항의 개수`.
37-
- 등차급수 = `0.5 * n * (초항 + 말항)` = `0.5 * n * [2a + (n-1) d]`.
35+
- 산술평균 = `전체 항의 합 / 항의 개수`
36+
- 등차급수 = `n * (초항 + 말항) / 2` = <img src="https://render.githubusercontent.com/render/math?math=\frac{n \cdot (2a %2b (n-1)d)}{2}">
3837

3938
## 영상 URL
4039

Diff for: ko/기초 수학/자릿수.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ N = 10000 [양수]
2424
3. N을 10으로 나눈다.
2525
4. N이 0이 될 때까지 위의 과정을 반복한다.
2626

27-
**알고리즘 분석:** 위 방법에서 수행되는 작업의 수는 숫자 N의 자릿수와 같다는 사실을 쉽게 알 수 있다. 따라서 이 방법의 시간 복잡도는 $O(자릿수)$이다.
27+
**알고리즘 분석:** 위 방법에서 수행되는 작업의 수는 숫자 N의 자릿수와 같다는 사실을 쉽게 알 수 있다. 따라서 이 방법의 시간 복잡도는 <img src="https://render.githubusercontent.com/render/math?math=O(d)">이다. (<img src="https://render.githubusercontent.com/render/math?math=d">는 숫자 N의 자릿수)
2828

2929
**모의 실행:** `N = 58964`라고 할 때,
3030

Diff for: ko/기초 수학/평균값.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,13 @@ sum = 160
4747
count = 7
4848
```
4949

50-
유효숫자를 무시하면: `sum / count = `22.<u>857142</u>
50+
유효숫자를 무시하면 22.<u>857142</u>
5151

52-
유효숫자를 고려하면: `sum / count = 23`
52+
유효숫자를 고려하면 23
5353

5454
### 5단계
5555

56-
22.<u>857142</u>나 `23` 반환한다.
56+
22.<u>857142</u>나 23을 반환한다.
5757

5858
## 구현
5959

Diff for: ko/자료구조/그래프/벨먼-포드 알고리즘.md

+10-11
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## 문제
44

5-
방향 가중치 그래프 $G(V,E)$와 시작점 $s \in V$가 주어졌을 때, 각 점 $v \in V$에 대하여 $s$와 $v$를 잇는 가장 짧은 경로를 구하라. ($V$는 꼭짓점의 집합, $E$는 간선의 집합)
5+
방향 가중치 그래프 <img src="https://render.githubusercontent.com/render/math?math=G(V,E)">와 시작점 <img src="https://render.githubusercontent.com/render/math?math=s \in V">가 주어졌을 때, 각 점 <img src="https://render.githubusercontent.com/render/math?math=v \in V">에 대하여 <img src="https://render.githubusercontent.com/render/math?math=s">와 <img src="https://render.githubusercontent.com/render/math?math=v">를 잇는 가장 짧은 경로를 구하라. (<img src="https://render.githubusercontent.com/render/math?math=V">는 꼭짓점의 집합, <img src="https://render.githubusercontent.com/render/math?math=E">는 간선의 집합)
66

77
## 절차
88

99
1. 시작점에서 모든 꼭짓점까지의 거리를 무한대로 초기화한다.
1010
2. 시작점으로의 거리를 0으로 초기화한다.
11-
3. `dist[s]`를 제외한 모든 값을 무한대로 하는 크기가 $|V|$`dist`라는 배열을 만든다.
12-
4. 다음을 $|V|-1$회 반복한다.
13-
5. $E$에 속한 모든 간선 `(u,v)`에 대해 다음을 반복한다:
11+
3. `dist[s]`를 제외한 모든 값을 무한대로 하는 크기가 <img src="https://render.githubusercontent.com/render/math?math=|V|">`dist`라는 배열을 만든다.
12+
4. 다음을 <img src="https://render.githubusercontent.com/render/math?math=|V|-1">회 반복한다.
13+
5. <img src="https://render.githubusercontent.com/render/math?math=E">에 속한 모든 간선 `(u,v)`에 대해 다음을 반복한다:
1414

1515
```
1616
dist[v] = minimum(dist[v], dist[u] + weight of edge)
@@ -20,11 +20,11 @@
2020

2121
## 시간 복잡도
2222

23-
$O(VE)$
23+
<img src="https://render.githubusercontent.com/render/math?math=O(VE)">
2424

2525
## 공간 복잡도
2626

27-
$O(V^2)$
27+
<img src="https://render.githubusercontent.com/render/math?math=O(V^2)">
2828

2929
## 만든 사람
3030

@@ -41,7 +41,6 @@ $O(V^2)$
4141
시작점: [ A, A, B, B, B, D, D, E ]
4242
4343
44-
4544
꼭짓점 개수 = 5
4645
간선 개수 = 8
4746
@@ -87,7 +86,7 @@ $O(V^2)$
8786
8887
for source = A
8988
90-
Vertex Distance from Source
89+
꼭짓점 시작점으로부터의 거리
9190
A 0 (A->A)
9291
B -1 (A->B)
9392
C 2 (A->B->C = -1 + 3)
@@ -98,9 +97,9 @@ $O(V^2)$
9897
## 구현
9998

10099
- [Java](https://github.com/TheAlgorithms/Java/blob/master/DataStructures/Graphs/BellmanFord.java)
101-
- [C++](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/Dynamic%20Programming/Bellman-Ford.cpp)
102-
- [Python](https://github.com/TheAlgorithms/Python/blob/master/data_structures/graph/bellman_ford.py)
103-
- [C](https://github.com/TheAlgorithms/C/blob/master/data_structures/graphs/Bellman-Ford.c)
100+
- [C++](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/dynamic_programming/bellman_ford.cpp)
101+
- [Python](https://github.com/TheAlgorithms/Python/blob/master/graphs/bellman_ford.py)
102+
- [C](https://github.com/TheAlgorithms/C/blob/master/data_structures/graphs/bellman_ford.c)
104103

105104
## 영상 URL
106105

Diff for: ko/자료구조/배열/배열.md

+3-6
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,13 @@
22

33
배열은 프로그래밍에서 가장 기본적인 데이터 구조이다. 배열은 정적 배열과 동적 배열로 나눠진다. 정적 배열은 요소의 수가 고정되어 있고, 각각은 메모리의 동일한 공간을 차지한다. 즉, 정적 배열이 차지하는 메모리는 컴파일 시간에 결정되지만, 동적 배열의 경우 크기가 고정되지 않는다.
44

5-
배열 요소의 값은 `O(1)` 시간 안에 검색할 수 있다.
5+
배열 요소의 값은 <img src="https://render.githubusercontent.com/render/math?math=O(1)"> 시간 안에 검색할 수 있다.
66

77
모든 배열은 연속된 메모리 주소를 가진다. 우리는 인덱스로 각 요소에 접근할 수 있다.
88
가장 낮은 인덱스는 첫 요소에 해당하고 가장 높은 인덱스는 마지막 요소에 해당한다.
99

10-
## YouTube
11-
12-
- [The Coding Train](https://youtu.be/NptnmWvkbTw)
13-
- [Simple Snippets (C++)](https://youtu.be/ibeGtDEQGz0)
14-
1510
## 영상 URL
1611

1712
- [GeeksforGeeks](https://www.geeksforgeeks.org/introduction-to-arrays/)
13+
- [The Coding Train](https://youtu.be/NptnmWvkbTw)
14+
- [Simple Snippets (C++)](https://youtu.be/ibeGtDEQGz0)

Diff for: ko/자료구조/연결 리스트/단일 연결 리스트.md

+12-11
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,26 @@
1414

1515
### 시간 복잡도
1616

17-
| 작업 | 평균 | 최악 |
18-
| ---- | ------ | ------ |
19-
| 접근 | $O(n)$ | $O(n)$ |
20-
| 탐색 | $O(n)$ | $O(n)$ |
21-
| 삽입 | $O(1)$ | $O(1)$ |
22-
| 제거 | $O(1)$ | $O(1)$ |
17+
| 작업 | 평균 | 최악 |
18+
| ---- | ---------------------------------------------------------------------- | ---------------------------------------------------------------------- |
19+
| 접근 | <img src="https://render.githubusercontent.com/render/math?math=O(n)"> | <img src="https://render.githubusercontent.com/render/math?math=O(n)"> |
20+
| 탐색 | <img src="https://render.githubusercontent.com/render/math?math=O(n)"> | <img src="https://render.githubusercontent.com/render/math?math=O(n)"> |
21+
| 삽입 | <img src="https://render.githubusercontent.com/render/math?math=O(1)"> | <img src="https://render.githubusercontent.com/render/math?math=O(1)"> |
22+
| 제거 | <img src="https://render.githubusercontent.com/render/math?math=O(1)"> | <img src="https://render.githubusercontent.com/render/math?math=O(1)"> |
2323

2424
## 예시
2525

2626
```java
2727
class LinkedList {
28-
Node head; // Pointer to the first element
29-
Node tail; // Optional. Points to the last element
28+
<<<<<<< HEAD
29+
Node head; // 첫 원소를 가리키는 포인터
30+
Node tail; // (Optional) 마지막 원소를 가리키는 포인터
3031

31-
int length; // Optional
32+
int length; // (Optional) 전체 노드 수
3233

3334
class Node {
34-
int data; // Node data. Can be int, string, float, templates, etc
35-
Node next; // Pointer to the next node on the list
35+
int data; // 노드의 데이터
36+
Node next; // 다음 노드를 가리키는 포인터
3637
}
3738
}
3839
```

0 commit comments

Comments
 (0)