Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 59ec2ae

Browse filesBrowse files
committed
Update
1 parent 1336a9f commit 59ec2ae
Copy full SHA for 59ec2ae

2 files changed

+8-14Lines changed: 8 additions & 14 deletions

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎README.md‎

Copy file name to clipboardExpand all lines: README.md
+2-4Lines changed: 2 additions & 4 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,7 @@
5959

6060
---
6161

62-
## Algorithm
63-
### Sort
62+
## Sort and Search
6463
* bubble sort를 구현한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/sort/BubbleSort.java)
6564
* Insertion sort를 구현한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/sort/InsertionSort.java)
6665
* Selection sort를 구현한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/sort/SelectionSort.java)
@@ -81,13 +80,12 @@
8180
</br>
8281

8382
## 알고리즘 문제 풀어보기
84-
### Exercise
8583

8684
### Dynamic Programming
8785
* Jump game [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/algorithm/dp/JumpGame.java)
8886

8987
### Others
90-
* 양 쪽의 합이 동일해지는 index의 값을 구한다. [code]()
88+
* 주어진 배열에서 양 쪽의 합이 동일해지는 index의 값을 구한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/exercise/SearchEquilibrium.java)
9189
* n!의 결과값에서 0의 개수를 구한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/exercise/FactorialZeroCount.java)
9290
* temp 를 사용하지 않고 두 변수를 swap 한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/exercise/NoTempSwapTest.java)
9391
* 어느날의 월, 일을 입력받아 요일을 반환하는 함수를 구현한다. [code](https://github.com/JaeYeopHan/algorithm_basic_java/blob/master/src/test/java/exercise/CalenderExample.java)
Collapse file

‎src/test/java/exercise/SearchEquilibrium.java‎

Copy file name to clipboardExpand all lines: src/test/java/exercise/SearchEquilibrium.java
+6-10Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,14 @@
77

88
public class SearchEquilibrium {
99

10+
/*
11+
TASK
12+
주어진 배열에서 양 쪽의 합이 동일해지는 index의 값을 구한다.
13+
*/
14+
1015
@Test
1116
public void test() {
12-
int[] arr = new int[9];
13-
arr[0] = -4;
14-
arr[1] = 8;
15-
arr[2] = 16;
16-
arr[3] = -22;
17-
arr[4] = 0;
18-
arr[5] = -4;
19-
arr[6] = 8;
20-
arr[7] = 16;
21-
arr[8] = -22;
17+
int[] arr = {-4, 8, 16, -22, 0, -4, 8, 16, -22};
2218
assertThat(true, is(solution(arr) == 0 || solution(arr) == 4));
2319
}
2420

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.