mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-12-19 07:00:35 +08:00
@@ -46,6 +46,17 @@ final class SortUtils {
|
||||
return v.compareTo(w) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* This method checks if first element is greater than or equal the other element
|
||||
*
|
||||
* @param v first element
|
||||
* @param w second element
|
||||
* @return true if the first element is greater than or equal the second element
|
||||
*/
|
||||
static <T extends Comparable<T>> boolean greaterOrEqual(T v, T w) {
|
||||
return v.compareTo(w) >= 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Prints a list
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user