mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-11 06:04:27 +08:00
Minor changes
This commit is contained in:
@ -10,7 +10,7 @@ import static sort.SortUtils.print;
|
|||||||
* @see SortAlgorithm
|
* @see SortAlgorithm
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BinaryTreeSort implements SortAlgorithm{
|
public class BinaryTreeSort implements SortAlgorithm {
|
||||||
|
|
||||||
interface TreeVisitor<T extends Comparable<T>> {
|
interface TreeVisitor<T extends Comparable<T>> {
|
||||||
void visit(Node<T> node);
|
void visit(Node<T> node);
|
||||||
|
@ -12,7 +12,7 @@ import static sort.SortUtils.*;
|
|||||||
* @see SortAlgorithm
|
* @see SortAlgorithm
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class BogoSort implements SortAlgorithm{
|
public class BogoSort implements SortAlgorithm {
|
||||||
|
|
||||||
private static final Random random = new Random();
|
private static final Random random = new Random();
|
||||||
|
|
||||||
|
@ -10,7 +10,7 @@ import static sort.SortUtils.*;
|
|||||||
* @see SortAlgorithm
|
* @see SortAlgorithm
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class BubbleSort implements SortAlgorithm{
|
class BubbleSort implements SortAlgorithm {
|
||||||
/**
|
/**
|
||||||
* This method implements the Generic Bubble Sort
|
* This method implements the Generic Bubble Sort
|
||||||
*
|
*
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
package sort;
|
||||||
|
|
||||||
import java.util.Scanner;
|
import java.util.Scanner;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user