Skip to content

Commit

Permalink
Added java docks
Browse files Browse the repository at this point in the history
  • Loading branch information
javasks committed Mar 2, 2020
1 parent a903531 commit cfcc92d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/com/sks/array/sort/BubbleSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,15 @@

import java.util.Arrays;

/**
* @author sandeepsingh
*/
public class BubbleSort {
/**
*
* @param array
* Bubble sort, biggest element will be at last in each iteration.
*/

public static void bubbleSort(int[] array) {
if( array.length < 2 || array == null) {
Expand Down
6 changes: 5 additions & 1 deletion src/com/sks/array/sort/SelectionSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,11 @@ Initially, the sorted subarray is empty and the unsorted subarray is the entire
7, 9, 12, 26, 28, 35, 87
*/

import java.util.Arrays;

/**
* @author sandeepsingh
*/
import java.util.Arrays;

public class SelectionSort {
public static void selectionSort(int[] array) {
Expand Down

0 comments on commit cfcc92d

Please sign in to comment.