style: enable AvoidStarImport in checkstyle (#5141)

This commit is contained in:
Piotr Idzik 2024-05-05 20:48:56 +02:00 committed by GitHub
parent dc47e0aa42
commit 414835db11
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
188 changed files with 479 additions and 310 deletions

View File

@ -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">

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -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: -

View File

@ -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)

View File

@ -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;
/**

View File

@ -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

View File

@ -1,6 +1,7 @@
package com.thealgorithms.conversions;
import java.util.*;
import java.util.HashMap;
import java.util.Map;
public class RomanToInteger {

View File

@ -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;

View File

@ -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 {

View File

@ -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

View File

@ -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>> {

View File

@ -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;

View File

@ -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.

View File

@ -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.

View File

@ -1,6 +1,6 @@
package com.thealgorithms.maths;
import java.util.*;
import java.util.Scanner;
/*
* @author Ojasva Jain

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
package com.thealgorithms.misc;
import java.util.*;
import java.util.Arrays;
public class RangeInSortedArray {

View File

@ -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

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -1,6 +1,6 @@
package com.thealgorithms.others;
import java.util.*;
import java.util.Scanner;
public class InsertDeleteInArray {

View File

@ -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;

View File

@ -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;

View File

@ -1,6 +1,6 @@
package com.thealgorithms.others;
import java.util.*;
import java.util.Scanner;
class PageRank {

View File

@ -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 {

View File

@ -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) */

View File

@ -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

View File

@ -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

View File

@ -1,6 +1,6 @@
package com.thealgorithms.searches;
import java.util.*;
import java.util.Scanner;
/*
Problem Statement:

View File

@ -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

View File

@ -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>> {

View File

@ -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 {

View File

@ -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;
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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;

View File

@ -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);
}
}

View File

@ -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--;
}

View File

@ -7,7 +7,8 @@
package com.thealgorithms.sorts;
import java.util.*;
import java.util.Arrays;
import java.util.Scanner;
public class LinkListSort {

View File

@ -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/

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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;
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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);
}
}

View File

@ -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

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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 {

View File

@ -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;

View File

@ -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;

View File

@ -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;
/**

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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