diff --git a/Conversions/HexToOct.java b/Conversions/HexToOct.java index c64f549a..636548fb 100644 --- a/Conversions/HexToOct.java +++ b/Conversions/HexToOct.java @@ -63,7 +63,7 @@ public class HexToOct { decnum = hex2decimal( hexadecnum); // Pass the string to the hex2decimal function and get the decimal form in - // variable decnum + // variable decnum // convert decimal to octal octalnum = decimal2octal(decnum); diff --git a/DataStructures/Graphs/BellmanFord.java b/DataStructures/Graphs/BellmanFord.java index 841277a3..b817b6dc 100644 --- a/DataStructures/Graphs/BellmanFord.java +++ b/DataStructures/Graphs/BellmanFord.java @@ -48,7 +48,7 @@ start vertex, end vertes and weights. Vertices should be labelled with a number public void go() // Interactive run for understanding the class first time. Assumes source vertex is 0 and - // shows distaance to all vertices + // shows distaance to all vertices { Scanner sc = new Scanner(System.in); // Grab scanner object for user input int i, v, e, u, ve, w, j, neg = 0; @@ -66,7 +66,7 @@ start vertex, end vertes and weights. Vertices should be labelled with a number int dist[] = new int [v]; // Distance array for holding the finalized shortest path distance between source - // and all vertices + // and all vertices int p[] = new int[v]; // Parent array for holding the paths for (i = 0; i < v; i++) dist[i] = Integer.MAX_VALUE; // Initializing distance values dist[0] = 0; @@ -115,7 +115,7 @@ start vertex, end vertes and weights. Vertices should be labelled with a number double dist[] = new double [v]; // Distance array for holding the finalized shortest path distance between source - // and all vertices + // and all vertices int p[] = new int[v]; // Parent array for holding the paths for (i = 0; i < v; i++) dist[i] = Integer.MAX_VALUE; // Initializing distance values dist[source] = 0; diff --git a/DataStructures/Graphs/FloydWarshall.java b/DataStructures/Graphs/FloydWarshall.java index 84cc3edd..017d0cd4 100644 --- a/DataStructures/Graphs/FloydWarshall.java +++ b/DataStructures/Graphs/FloydWarshall.java @@ -13,7 +13,7 @@ public class FloydWarshall { new int[numberofvertices + 1] [numberofvertices + 1]; // stores the value of distance from all the possible path form the source - // vertex to destination vertex + // vertex to destination vertex Arrays.fill(DistanceMatrix, 0); this.numberofvertices = numberofvertices; } diff --git a/DataStructures/Heaps/HeapElement.java b/DataStructures/Heaps/HeapElement.java index 5db98783..e15763bf 100644 --- a/DataStructures/Heaps/HeapElement.java +++ b/DataStructures/Heaps/HeapElement.java @@ -1,6 +1,5 @@ package DataStructures.Heaps; - /** * Class for heap elements.
* diff --git a/DataStructures/Lists/SinglyLinkedList.java b/DataStructures/Lists/SinglyLinkedList.java index d6b0beba..a1ce500d 100644 --- a/DataStructures/Lists/SinglyLinkedList.java +++ b/DataStructures/Lists/SinglyLinkedList.java @@ -61,12 +61,12 @@ public class SinglyLinkedList { checkBounds(position, 0, size); Node newNode = new Node(data); if (head == null) { - /* the list is empty */ + /* the list is empty */ head = newNode; size++; return; } else if (position == 0) { - /* insert at the head of the list */ + /* insert at the head of the list */ newNode.next = head; head = newNode; size++; diff --git a/Others/BestFit.java b/Others/BestFit.java index bfe775be..8eec9f61 100644 --- a/Others/BestFit.java +++ b/Others/BestFit.java @@ -38,7 +38,7 @@ public class BestFit { int minDiff = findMaxElement(blockSizes); int index = NO_ALLOCATION; // If there is no block that can fit the process, return NO_ALLOCATION as the - // result. + // result. for (int i = 0; i < blockSizes.length; i++) { // Find the most fitting memory block for the given process. diff --git a/Others/GuassLegendre.java b/Others/GuassLegendre.java index a1df3e22..4b30bdc3 100644 --- a/Others/GuassLegendre.java +++ b/Others/GuassLegendre.java @@ -1,6 +1,5 @@ package Others; - /** * Guass Legendre Algorithm ref https://en.wikipedia.org/wiki/Gauss–Legendre_algorithm * diff --git a/Others/ReturnSubsequence.java b/Others/ReturnSubsequence.java index 67a98686..bb080f55 100644 --- a/Others/ReturnSubsequence.java +++ b/Others/ReturnSubsequence.java @@ -23,7 +23,7 @@ public class ReturnSubsequence { private static String[] returnSubsequence(String givenString) { if (givenString.length() == 0) // If string is empty we will create an array of size=1 and insert "" (Empty string) - // in it + // in it { String[] ans = new String[1]; ans[0] = ""; @@ -33,7 +33,7 @@ public class ReturnSubsequence { returnSubsequence( givenString.substring( 1)); // recursive call to get subsequences of substring starting from index - // position=1 + // position=1 String[] ans = new String @@ -47,7 +47,7 @@ public class ReturnSubsequence { givenString.charAt(0) + SmallAns[ k]; // Insert character at index=0 of the given substring in front of every string - // in SmallAns + // in SmallAns } return ans; } diff --git a/Searches/JumpSearch.java b/Searches/JumpSearch.java index 87eafe25..2770bbf8 100644 --- a/Searches/JumpSearch.java +++ b/Searches/JumpSearch.java @@ -31,7 +31,7 @@ public class JumpSearch implements SearchAlgorithm { for (int i = limit - blockSize; i <= limit; i++) { if (array[i] == key) { - /* execute linear search */ + /* execute linear search */ return i; } }