style: enable AvoidStarImport
in checkstyle (#5141)
This commit is contained in:
parent
dc47e0aa42
commit
414835db11
@ -120,7 +120,7 @@
|
||||
|
||||
<!-- Checks for imports -->
|
||||
<!-- See https://checkstyle.org/checks/imports/index.html -->
|
||||
<!-- TODO <module name="AvoidStarImport"/> -->
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports">
|
||||
|
@ -8,7 +8,8 @@
|
||||
/**Wikipedia link -> https://en.wikipedia.org/wiki/Shortest_path_problem */
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class AllPathsFromSourceToTarget {
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
||||
/**
|
||||
* Finds all permutations of 1...n of length k
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
||||
/**
|
||||
* Finds all permutations of given array
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
/*
|
||||
* Problem Statement: -
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Queue;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
|
||||
|
@ -3,7 +3,12 @@ package com.thealgorithms.ciphers;
|
||||
import java.security.InvalidAlgorithmParameterException;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import javax.crypto.*;
|
||||
import javax.crypto.BadPaddingException;
|
||||
import javax.crypto.Cipher;
|
||||
import javax.crypto.IllegalBlockSizeException;
|
||||
import javax.crypto.KeyGenerator;
|
||||
import javax.crypto.NoSuchPaddingException;
|
||||
import javax.crypto.SecretKey;
|
||||
import javax.crypto.spec.GCMParameterSpec;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* Converts any Binary Number to a Hexadecimal Number
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class RomanToInteger {
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.thealgorithms.datastructures.dynamicarray;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.ConcurrentModificationException;
|
||||
import java.util.Iterator;
|
||||
import java.util.NoSuchElementException;
|
||||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.stream.Stream;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
@ -3,7 +3,11 @@
|
||||
*/
|
||||
package com.thealgorithms.datastructures.graphs;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.PriorityQueue;
|
||||
|
||||
public class A_Star {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.datastructures.graphs;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
class BellmanFord /*
|
||||
* Implementation of Bellman ford to detect negative cycles. Graph accepts
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.datastructures.heaps;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
|
||||
public class GenericHeap<T extends Comparable<T>> {
|
||||
|
||||
|
@ -1,6 +1,11 @@
|
||||
package com.thealgorithms.datastructures.lists;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.Random;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.thealgorithms.datastructures.trees;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Given tree is traversed in a 'post-order' way: LEFT -> RIGHT -> ROOT.
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.thealgorithms.datastructures.trees;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Deque;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Given a binary tree.
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/*
|
||||
* @author Ojasva Jain
|
||||
|
@ -1,7 +1,8 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import java.math.BigInteger;
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class KaprekarNumbers {
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.Scanner;
|
||||
|
||||
class KeithNumber {
|
||||
|
||||
|
@ -5,7 +5,9 @@ A number is a Krishnamurthy number if the sum of the factorials of the digits of
|
||||
to the number itself. For example, 1, 2 and 145 are Krishnamurthy numbers. Krishnamurthy number is
|
||||
also referred to as a Strong number.
|
||||
*/
|
||||
import java.io.*;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
public class KrishnamurthyNumber {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* Is a common mathematics concept to find the smallest value number
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.maths;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/*A magic square of order n is an arrangement of distinct n^2 integers,in a square, such that the n
|
||||
numbers in all rows, all columns, and both diagonals sum to the same constant. A magic square
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.misc;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
|
||||
public class RangeInSortedArray {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.misc;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
* The array is divided into four sections: a[1..Lo-1] zeroes a[Lo..Mid-1] ones
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.misc;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/*
|
||||
*A matrix is sparse if many of its coefficients are zero (In general if 2/3rd of matrix elements
|
||||
|
@ -1,6 +1,14 @@
|
||||
package com.thealgorithms.misc;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.LinkedHashSet;
|
||||
import java.util.List;
|
||||
import java.util.Scanner;
|
||||
import java.util.Set;
|
||||
|
||||
public class ThreeSumProblem {
|
||||
|
||||
|
@ -1,6 +1,12 @@
|
||||
package com.thealgorithms.misc;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class WordBoggle {
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.others;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class Conway {
|
||||
|
||||
|
@ -15,7 +15,10 @@ package com.thealgorithms.others;
|
||||
* https://rosettacode.org/wiki/Dijkstra%27s_algorithm#Java Also most of the
|
||||
* comments are from RosettaCode.
|
||||
*/
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.NavigableSet;
|
||||
import java.util.TreeSet;
|
||||
|
||||
public class Dijkstra {
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.others;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class InsertDeleteInArray {
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.others;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.BasicStroke;
|
||||
import java.awt.Color;
|
||||
import java.awt.Graphics2D;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.others;
|
||||
|
||||
import java.awt.*;
|
||||
import java.awt.Color;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.others;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
class PageRank {
|
||||
|
||||
|
@ -4,7 +4,7 @@ package com.thealgorithms.others;
|
||||
* Given a matrix of size n x n We have to rotate this matrix by 90 Degree Here
|
||||
* is the algorithm for this problem .
|
||||
*/
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
class Rotate_by_90_degree {
|
||||
|
||||
|
@ -1,7 +1,13 @@
|
||||
package com.thealgorithms.others;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Scanner;
|
||||
|
||||
/* display the most frequent K words in the file and the times it appear
|
||||
in the file – shown in order (ignore case and periods) */
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.scheduling;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.PriorityQueue;
|
||||
|
||||
/**
|
||||
* Preemptive Priority Scheduling Algorithm
|
||||
|
@ -1,7 +1,11 @@
|
||||
package com.thealgorithms.searches;
|
||||
|
||||
import com.thealgorithms.datastructures.Node;
|
||||
import java.util.*;
|
||||
import java.util.ArrayDeque;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.Queue;
|
||||
|
||||
/**
|
||||
* @author: caos321
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.searches;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
/*
|
||||
Problem Statement:
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.searches;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* An implementation of the Quickselect algorithm as described
|
||||
|
@ -4,7 +4,7 @@
|
||||
// Explanation:- https://www.tutorialspoint.com/java-program-for-binary-search-recursive
|
||||
package com.thealgorithms.searches;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
|
||||
// Create a SearchAlgorithm class with a generic type
|
||||
abstract class SearchAlgorithm<T extends Comparable<T>> {
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.searches;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class UnionFind {
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
/**
|
||||
* @author Varun Upadhyay (https://github.com/varunu28)
|
||||
* @author Podshivalov Nikita (https://github.com/nikitap492)
|
||||
@ -21,8 +19,8 @@ class BubbleSort implements SortAlgorithm {
|
||||
for (int i = 1, size = array.length; i < size; ++i) {
|
||||
boolean swapped = false;
|
||||
for (int j = 0; j < size - i; ++j) {
|
||||
if (greater(array[j], array[j + 1])) {
|
||||
swap(array, j, j + 1);
|
||||
if (SortUtils.greater(array[j], array[j + 1])) {
|
||||
SortUtils.swap(array, j, j + 1);
|
||||
swapped = true;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
public class CircleSort implements SortAlgorithm {
|
||||
|
||||
/* This method implements the circle sort
|
||||
@ -35,7 +33,7 @@ public class CircleSort implements SortAlgorithm {
|
||||
|
||||
while (low < high) {
|
||||
if (array[low].compareTo(array[high]) > 0) {
|
||||
swap(array, low, high);
|
||||
SortUtils.swap(array, low, high);
|
||||
swapped = true;
|
||||
}
|
||||
low++;
|
||||
@ -43,7 +41,7 @@ public class CircleSort implements SortAlgorithm {
|
||||
}
|
||||
|
||||
if (low == high && array[low].compareTo(array[high + 1]) > 0) {
|
||||
swap(array, low, high + 1);
|
||||
SortUtils.swap(array, low, high + 1);
|
||||
swapped = true;
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
/**
|
||||
* Comb Sort algorithm implementation
|
||||
*
|
||||
@ -52,9 +50,9 @@ class CombSort implements SortAlgorithm {
|
||||
|
||||
// Compare all elements with current gap
|
||||
for (int i = 0; i < size - gap; i++) {
|
||||
if (less(arr[i + gap], arr[i])) {
|
||||
if (SortUtils.less(arr[i + gap], arr[i])) {
|
||||
// Swap arr[i] and arr[i+gap]
|
||||
swap(arr, i, i + gap);
|
||||
SortUtils.swap(arr, i, i + gap);
|
||||
swapped = true;
|
||||
}
|
||||
}
|
||||
@ -88,6 +86,6 @@ class CombSort implements SortAlgorithm {
|
||||
ob.sort(arr);
|
||||
|
||||
System.out.println("sorted array");
|
||||
print(arr);
|
||||
SortUtils.print(arr);
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,11 @@ import static com.thealgorithms.sorts.SortUtils.print;
|
||||
import static java.util.stream.Collectors.toList;
|
||||
import static java.util.stream.Collectors.toMap;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
import java.util.stream.IntStream;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
/**
|
||||
* Implementation of gnome sort
|
||||
*
|
||||
@ -15,10 +13,10 @@ public class GnomeSort implements SortAlgorithm {
|
||||
int i = 1;
|
||||
int j = 2;
|
||||
while (i < arr.length) {
|
||||
if (less(arr[i - 1], arr[i])) {
|
||||
if (SortUtils.less(arr[i - 1], arr[i])) {
|
||||
i = j++;
|
||||
} else {
|
||||
swap(arr, i - 1, i);
|
||||
SortUtils.swap(arr, i - 1, i);
|
||||
if (--i == 0) {
|
||||
i = j++;
|
||||
}
|
||||
@ -67,7 +65,7 @@ public class GnomeSort implements SortAlgorithm {
|
||||
gnomeSort.sort(strings);
|
||||
|
||||
System.out.println("After sort : ");
|
||||
print(integers);
|
||||
print(strings);
|
||||
SortUtils.print(integers);
|
||||
SortUtils.print(strings);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
class InsertionSort implements SortAlgorithm {
|
||||
@ -20,8 +18,8 @@ class InsertionSort implements SortAlgorithm {
|
||||
|
||||
public <T extends Comparable<T>> T[] sort(T[] array, int lo, int hi) {
|
||||
for (int i = lo; i < hi; i++) {
|
||||
for (int j = i; j > lo && less(array[j], array[j - 1]); j--) {
|
||||
swap(array, j, j - 1);
|
||||
for (int j = i; j > lo && SortUtils.less(array[j], array[j - 1]); j--) {
|
||||
SortUtils.swap(array, j, j - 1);
|
||||
}
|
||||
}
|
||||
return array;
|
||||
@ -45,13 +43,13 @@ class InsertionSort implements SortAlgorithm {
|
||||
// put the smallest element to the 0 position as a sentinel, which will allow us to avoid
|
||||
// redundant comparisons like `j > 0` further
|
||||
for (int i = 1; i < n; i++)
|
||||
if (less(array[i], array[minElemIndex])) minElemIndex = i;
|
||||
swap(array, 0, minElemIndex);
|
||||
if (SortUtils.less(array[i], array[minElemIndex])) minElemIndex = i;
|
||||
SortUtils.swap(array, 0, minElemIndex);
|
||||
|
||||
for (int i = 2; i < n; i++) {
|
||||
int j = i;
|
||||
T currentValue = array[i];
|
||||
while (less(currentValue, array[j - 1])) {
|
||||
while (SortUtils.less(currentValue, array[j - 1])) {
|
||||
array[j] = array[j - 1];
|
||||
j--;
|
||||
}
|
||||
|
@ -7,7 +7,8 @@
|
||||
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Scanner;
|
||||
|
||||
public class LinkListSort {
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.Arrays;
|
||||
import java.util.Scanner;
|
||||
|
||||
/*This code implements the mergeSort algorithm without extra space
|
||||
For understanding about mergesort visit :https://www.geeksforgeeks.org/merge-sort/
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
/**
|
||||
* Implementation of pancake sort
|
||||
*
|
||||
@ -18,12 +16,12 @@ public class PancakeSort implements SortAlgorithm {
|
||||
T max = array[0];
|
||||
int index = 0;
|
||||
for (int j = 0; j < size - i; j++) {
|
||||
if (less(max, array[j])) {
|
||||
if (SortUtils.less(max, array[j])) {
|
||||
max = array[j];
|
||||
index = j;
|
||||
}
|
||||
}
|
||||
flip(array, index, array.length - 1 - i);
|
||||
SortUtils.flip(array, index, array.length - 1 - i);
|
||||
}
|
||||
return array;
|
||||
}
|
||||
@ -62,6 +60,6 @@ public class PancakeSort implements SortAlgorithm {
|
||||
PancakeSort pancakeSort = new PancakeSort();
|
||||
System.out.println("After sorting:");
|
||||
pancakeSort.sort(arr);
|
||||
print(arr);
|
||||
SortUtils.print(arr);
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class PigeonholeSort {
|
||||
|
||||
@ -42,7 +40,7 @@ public class PigeonholeSort {
|
||||
Integer[] arr = {8, 3, 2, 7, 4, 6, 8};
|
||||
|
||||
System.out.print("Unsorted order is : ");
|
||||
print(arr);
|
||||
SortUtils.print(arr);
|
||||
|
||||
pigeonholeSort.sort(arr);
|
||||
|
||||
@ -50,6 +48,6 @@ public class PigeonholeSort {
|
||||
for (int i = 0; i < arr.length; i++) {
|
||||
assert (arr[i]) <= (arr[i + 1]);
|
||||
}
|
||||
print(arr);
|
||||
SortUtils.print(arr);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
/**
|
||||
* @author Varun Upadhyay (https://github.com/varunu28)
|
||||
* @author Podshivalov Nikita (https://github.com/nikitap492)
|
||||
@ -45,7 +43,7 @@ class QuickSort implements SortAlgorithm {
|
||||
*/
|
||||
private static <T extends Comparable<T>> int randomPartition(T[] array, int left, int right) {
|
||||
int randomIndex = left + (int) (Math.random() * (right - left + 1));
|
||||
swap(array, randomIndex, right);
|
||||
SortUtils.swap(array, randomIndex, right);
|
||||
return partition(array, left, right);
|
||||
}
|
||||
|
||||
@ -62,14 +60,14 @@ class QuickSort implements SortAlgorithm {
|
||||
T pivot = array[mid];
|
||||
|
||||
while (left <= right) {
|
||||
while (less(array[left], pivot)) {
|
||||
while (SortUtils.less(array[left], pivot)) {
|
||||
++left;
|
||||
}
|
||||
while (less(pivot, array[right])) {
|
||||
while (SortUtils.less(pivot, array[right])) {
|
||||
--right;
|
||||
}
|
||||
if (left <= right) {
|
||||
swap(array, left, right);
|
||||
SortUtils.swap(array, left, right);
|
||||
++left;
|
||||
--right;
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
public class ShellSort implements SortAlgorithm {
|
||||
|
||||
/**
|
||||
@ -25,7 +23,7 @@ public class ShellSort implements SortAlgorithm {
|
||||
for (int i = gap; i < length; i++) {
|
||||
int j;
|
||||
T temp = array[i];
|
||||
for (j = i; j >= gap && less(temp, array[j - gap]); j -= gap) {
|
||||
for (j = i; j >= gap && SortUtils.less(temp, array[j - gap]); j -= gap) {
|
||||
array[j] = array[j - gap];
|
||||
}
|
||||
array[j] = temp;
|
||||
@ -43,6 +41,6 @@ public class ShellSort implements SortAlgorithm {
|
||||
for (int i = 0; i < toSort.length - 1; ++i) {
|
||||
assert toSort[i] <= toSort[i + 1];
|
||||
}
|
||||
print(toSort);
|
||||
SortUtils.print(toSort);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
public class SimpleSort implements SortAlgorithm {
|
||||
|
||||
@Override
|
||||
@ -10,7 +8,7 @@ public class SimpleSort implements SortAlgorithm {
|
||||
|
||||
for (int i = 0; i < LENGTH; i++) {
|
||||
for (int j = i + 1; j < LENGTH; j++) {
|
||||
if (less(array[j], array[i])) {
|
||||
if (SortUtils.less(array[j], array[i])) {
|
||||
T element = array[j];
|
||||
array[j] = array[i];
|
||||
array[i] = element;
|
||||
@ -25,12 +23,12 @@ public class SimpleSort implements SortAlgorithm {
|
||||
// ==== Int =======
|
||||
Integer[] a = {3, 7, 45, 1, 33, 5, 2, 9};
|
||||
System.out.print("unsorted: ");
|
||||
print(a);
|
||||
SortUtils.print(a);
|
||||
System.out.println();
|
||||
|
||||
new SimpleSort().sort(a);
|
||||
System.out.print("sorted: ");
|
||||
print(a);
|
||||
SortUtils.print(a);
|
||||
System.out.println();
|
||||
|
||||
// ==== String =======
|
||||
@ -45,11 +43,11 @@ public class SimpleSort implements SortAlgorithm {
|
||||
"pineapple",
|
||||
};
|
||||
System.out.print("unsorted: ");
|
||||
print(b);
|
||||
SortUtils.print(b);
|
||||
System.out.println();
|
||||
|
||||
new SimpleSort().sort(b);
|
||||
System.out.print("sorted: ");
|
||||
print(b);
|
||||
SortUtils.print(b);
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,5 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import static com.thealgorithms.sorts.SortUtils.*;
|
||||
|
||||
/**
|
||||
* The idea of Swap-Sort is to count the number m of smaller values (that are in
|
||||
* A) from each element of an array A(1...n) and then swap the element with the
|
||||
@ -34,7 +32,7 @@ public class SwapSort implements SortAlgorithm {
|
||||
private <T extends Comparable<T>> int getSmallerElementCount(T[] array, int index) {
|
||||
int counter = 0;
|
||||
for (int i = 0; i < array.length; i++) {
|
||||
if (less(array[i], array[index])) {
|
||||
if (SortUtils.less(array[i], array[index])) {
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
@ -46,12 +44,12 @@ public class SwapSort implements SortAlgorithm {
|
||||
// ==== Int =======
|
||||
Integer[] a = {3, 7, 45, 1, 33, 5, 2, 9};
|
||||
System.out.print("unsorted: ");
|
||||
print(a);
|
||||
SortUtils.print(a);
|
||||
System.out.println();
|
||||
|
||||
new SwapSort().sort(a);
|
||||
System.out.print("sorted: ");
|
||||
print(a);
|
||||
SortUtils.print(a);
|
||||
System.out.println();
|
||||
|
||||
// ==== String =======
|
||||
@ -66,11 +64,11 @@ public class SwapSort implements SortAlgorithm {
|
||||
"pineapple",
|
||||
};
|
||||
System.out.print("unsorted: ");
|
||||
print(b);
|
||||
SortUtils.print(b);
|
||||
System.out.println();
|
||||
|
||||
new SwapSort().sort(b);
|
||||
System.out.print("sorted: ");
|
||||
print(b);
|
||||
SortUtils.print(b);
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,10 @@
|
||||
package com.thealgorithms.sorts;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.LinkedList;
|
||||
|
||||
/**
|
||||
* The Topological Sorting algorithm linearly orders a DAG or Directed Acyclic Graph into
|
||||
|
@ -8,7 +8,8 @@ package com.thealgorithms.stacks;
|
||||
// e.g.'
|
||||
// ((a + b) + (c + d)) -> false
|
||||
// (a + b) + ((c + d)) -> true
|
||||
import java.util.*;
|
||||
import java.util.Scanner;
|
||||
import java.util.Stack;
|
||||
|
||||
public class DuplicateBrackets {
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.strings;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
public class Isomorphic {
|
||||
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.strings;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
public class LetterCombinationsOfPhoneNumber {
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertIterableEquals;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class AllPathsFromSourceToTargetTest {
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.TreeSet;
|
||||
|
@ -1,8 +1,8 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.*;
|
||||
import java.util.ArrayList;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
/**
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.backtracking;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -5,7 +5,8 @@ package com.thealgorithms.bitmanipulation;
|
||||
* @author Bama Charan Chhandogi
|
||||
*/
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.bitmanipulation;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.ciphers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.ciphers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.ciphers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.ciphers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.conversions;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,11 +1,18 @@
|
||||
package com.thealgorithms.datastructures.buffers;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.CountDownLatch;
|
||||
import java.util.concurrent.ExecutorService;
|
||||
import java.util.concurrent.Executors;
|
||||
import java.util.concurrent.ThreadLocalRandom;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.atomic.AtomicIntegerArray;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.RepeatedTest;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.datastructures.crdt;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.datastructures.crdt;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.datastructures.crdt;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.datastructures.crdt;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Set;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.datastructures.crdt;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.thealgorithms.datastructures.crdt;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,6 +1,8 @@
|
||||
package com.thealgorithms.datastructures.graphs;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import com.thealgorithms.datastructures.graphs.BoruvkaAlgorithm.Graph;
|
||||
import java.util.ArrayList;
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.datastructures.graphs;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertArrayEquals;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.datastructures.hashmap;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import com.thealgorithms.datastructures.hashmap.hashing.HashMapCuckooHashing;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.datastructures.hashmap.hashing;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.datastructures.hashmap.hashing;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.thealgorithms.datastructures.hashmap.hashing;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
|
@ -1,6 +1,9 @@
|
||||
package com.thealgorithms.datastructures.hashmap.hashing;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertFalse;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
|
||||
import java.util.Random;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
@ -6,7 +6,8 @@ package com.thealgorithms.datastructures.lists;
|
||||
* GitHub: https://github.com/Prabhat-Kumar-42
|
||||
*/
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNull;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user