docs: update the whole repository

* fix some bugs
* delete duplicate files
* format code
This commit is contained in:
yanglbme
2019-05-09 19:32:54 +08:00
parent 163db8521a
commit 29948363da
368 changed files with 4372 additions and 30841 deletions

View File

@ -4,15 +4,15 @@ import java.util.Arrays;
import java.util.List;
/**
* The common interface of most sorting algorithms
* The common interface of most sorting algorithms
*
* @author Podshivalov Nikita (https://github.com/nikitap492)
*
**/
public interface SortAlgorithm {
/**
* Main method arrays sorting algorithms
*
* @param unsorted - an array should be sorted
* @return a sorted array
*/
@ -20,11 +20,12 @@ public interface SortAlgorithm {
/**
* Auxiliary method for algorithms what wanted to work with lists from JCF
*
* @param unsorted - a list should be sorted
* @return a sorted list
*/
@SuppressWarnings("unchecked")
default <T extends Comparable<T>> List<T> sort(List<T> unsorted){
default <T extends Comparable<T>> List<T> sort(List<T> unsorted) {
return Arrays.asList(sort(unsorted.toArray((T[]) new Comparable[unsorted.size()])));
}