style: enable TypeName (#5214)

* style: enable `TypeName` in checkstyle

* style: enable `TypeName` in checkstyle

* Update directory

* style: use proper formatting

---------

Co-authored-by: StarDxxx <StarDxxx@users.noreply.github.com>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:
StarDxxx
2024-06-08 19:37:20 +08:00
committed by GitHub
parent be38886d43
commit a81fb32e6c
19 changed files with 61 additions and 59 deletions

View File

@ -9,8 +9,8 @@ import java.util.Comparator;
import java.util.List;
import java.util.PriorityQueue;
public final class A_Star {
private A_Star() {
public final class AStar {
private AStar() {
}
private static class Graph {

View File

@ -4,7 +4,7 @@ for better understanding
*/
package com.thealgorithms.datastructures.graphs;
class dijkstras {
class Dijkstras {
int k = 9;
@ -67,7 +67,7 @@ class dijkstras {
{8, 11, 0, 0, 0, 0, 1, 0, 7},
{0, 0, 2, 0, 0, 0, 6, 7, 0},
};
dijkstras t = new dijkstras();
Dijkstras t = new Dijkstras();
t.dijkstra(graph, 0);
} // main
} // djikstras

View File

@ -7,7 +7,7 @@ import java.util.PriorityQueue;
/**
* @author Arun Pandey (https://github.com/pandeyarun709)
*/
public class Merge_K_SortedLinkedlist {
public class MergeKSortedLinkedlist {
/**
* This function merge K sorted LinkedList

View File

@ -27,6 +27,6 @@ The `next` variable points to the next node in the data structure and value stor
3. `CountSinglyLinkedListRecursion.java`: Recursively counts the size of a list.
4. `CreateAndDetectLoop.java` : Create and detect a loop in a linked list.
5. `DoublyLinkedList.java` : A modification of singly linked list which has a `prev` pointer to point to the previous node.
6. `Merge_K_SortedLinkedlist.java` : Merges K sorted linked list with mergesort (mergesort is also the most efficient sorting algorithm for linked list).
6. `MergeKSortedLinkedlist.java` : Merges K sorted linked list with mergesort (mergesort is also the most efficient sorting algorithm for linked list).
7. `RandomNode.java` : Selects a random node from given linked list and diplays it.
8. `SkipList.java` : Data Structure used for storing a sorted list of elements with help of a Linked list hierarchy that connects to subsequences of elements.

View File

@ -18,8 +18,8 @@ import java.util.Scanner;
* @version 11.0.9
* @since 2014-03-31
*/
public final class matrixTranspose {
private matrixTranspose() {
public final class MatrixTranspose {
private MatrixTranspose() {
}
public static void main(String[] args) {

View File

@ -1,6 +1,6 @@
package com.thealgorithms.others;
public class countSetBits {
public class CountSetBits {
/**
* The below algorithm is called as Brian Kernighan's algorithm
@ -40,7 +40,7 @@ public class countSetBits {
* @param num takes Long number whose number of set bit is to be found
* @return the count of set bits in the binary equivalent
*/
public long countsetBits(long num) {
public long countSetBits(long num) {
long cnt = 0;
while (num > 0) {
cnt++;

View File

@ -6,8 +6,8 @@ package com.thealgorithms.others;
*/
import java.util.Scanner;
final class Rotate_by_90_degrees {
private Rotate_by_90_degrees() {
final class RotateMatrixBy90Degrees {
private RotateMatrixBy90Degrees() {
}
public static void main(String[] args) {

View File

@ -1,6 +1,6 @@
package com.thealgorithms.searches;
public final class sortOrderAgnosticBinarySearch {
private sortOrderAgnosticBinarySearch() {
public final class SortOrderAgnosticBinarySearch {
private SortOrderAgnosticBinarySearch() {
}
public static int find(int[] arr, int key) {
int start = 0;

View File

@ -2,8 +2,8 @@ package com.thealgorithms.strings;
import java.util.HashMap;
final class longestNonRepeativeSubstring {
private longestNonRepeativeSubstring() {
final class LongestNonRepeativeSubstring {
private LongestNonRepeativeSubstring() {
}
public static int lengthOfLongestSubstring(String s) {

View File

@ -1,7 +1,7 @@
package com.thealgorithms.strings.zigZagPattern;
final class zigZagPattern {
private zigZagPattern() {
final class ZigZagPattern {
private ZigZagPattern() {
}
public static String encode(String s, int numRows) {