Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
gyusuk committed Jun 9, 2019
1 parent ae51b01 commit 36b430b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Algorithm/HeapSort.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@



```
```java
public void heapSort(int[] array) {
int n = array.length;

Expand Down Expand Up @@ -85,7 +85,7 @@ public void heapSort(int[] array) {


```
```java
public void heapify(int array[], int n, int i) {
int p = i;
int l = i*2 + 1;
Expand Down Expand Up @@ -132,7 +132,7 @@ public void heapify(int array[], int n, int i) {

##### ์ „์ฒด ์†Œ์Šค ์ฝ”๋“œ

```
```java
private void solve() {
int[] array = { 230, 10, 60, 550, 40, 220, 20 };

Expand Down
6 changes: 3 additions & 3 deletions Algorithm/MergeSort.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

- mergeSort

```
```java
public void mergeSort(int[] array, int left, int right) {

if(left < right) {
Expand Down Expand Up @@ -58,7 +58,7 @@ public void mergeSort(int[] array, int left, int right) {

- merge()

```
```java
public static void merge(int[] array, int left, int mid, int right) {
int[] L = Arrays.copyOfRange(array, left, mid + 1);
int[] R = Arrays.copyOfRange(array, mid + 1, right + 1);
Expand Down Expand Up @@ -116,7 +116,7 @@ public static void merge(int[] array, int left, int mid, int right) {



```
```java
private void solve() {
int[] array = { 230, 10, 60, 550, 40, 220, 20 };

Expand Down
8 changes: 4 additions & 4 deletions Algorithm/QuickSort.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@



```
```java
public void quickSort(int[] array, int left, int right) {

if(left >= right) return;
Expand All @@ -33,7 +33,7 @@ public void quickSort(int[] array, int left, int right) {



```
```java
public int partition(int[] array, int left, int right) {
int pivot = array[left];
int i = left, j = right;
Expand Down Expand Up @@ -84,7 +84,7 @@ But, ํ€ต ์ •๋ ฌ๋„ ์š”์†Œ๋“ค์ด ์—ญ์ˆœ์œผ๋กœ ์กด์žฌํ•  ๋•Œ ์ตœ์•…์˜ ๊ฒฝ์šฐ๋กœ



```
```java
public int partition(int[] array, int left, int right) {
int mid = (left + right) / 2;
swap(array, left, mid);
Expand All @@ -98,7 +98,7 @@ public int partition(int[] array, int left, int right) {


```
```java
private void solve() {
int[] array = { 80, 70, 60, 50, 40, 30, 20 };
quicksort(array, 0, array.length - 1);
Expand Down

0 comments on commit 36b430b

Please sign in to comment.