Skip to content

Commit 0db62bb

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
Formatted with Google Java Formatter
1 parent d27ded9 commit 0db62bb

File tree

9 files changed

+12
-14
lines changed

9 files changed

+12
-14
lines changed

Conversions/HexToOct.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public static void main(String args[]) {
6363
decnum =
6464
hex2decimal(
6565
hexadecnum); // Pass the string to the hex2decimal function and get the decimal form in
66-
// variable decnum
66+
// variable decnum
6767

6868
// convert decimal to octal
6969
octalnum = decimal2octal(decnum);

DataStructures/Graphs/BellmanFord.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public static void main(String args[]) {
4848

4949
public void
5050
go() // Interactive run for understanding the class first time. Assumes source vertex is 0 and
51-
// shows distaance to all vertices
51+
// shows distaance to all vertices
5252
{
5353
Scanner sc = new Scanner(System.in); // Grab scanner object for user input
5454
int i, v, e, u, ve, w, j, neg = 0;
@@ -66,7 +66,7 @@ public static void main(String args[]) {
6666
int dist[] =
6767
new int
6868
[v]; // Distance array for holding the finalized shortest path distance between source
69-
// and all vertices
69+
// and all vertices
7070
int p[] = new int[v]; // Parent array for holding the paths
7171
for (i = 0; i < v; i++) dist[i] = Integer.MAX_VALUE; // Initializing distance values
7272
dist[0] = 0;
@@ -115,7 +115,7 @@ public void show(
115115
double dist[] =
116116
new double
117117
[v]; // Distance array for holding the finalized shortest path distance between source
118-
// and all vertices
118+
// and all vertices
119119
int p[] = new int[v]; // Parent array for holding the paths
120120
for (i = 0; i < v; i++) dist[i] = Integer.MAX_VALUE; // Initializing distance values
121121
dist[source] = 0;

DataStructures/Graphs/FloydWarshall.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public FloydWarshall(int numberofvertices) {
1313
new int[numberofvertices + 1]
1414
[numberofvertices
1515
+ 1]; // stores the value of distance from all the possible path form the source
16-
// vertex to destination vertex
16+
// vertex to destination vertex
1717
Arrays.fill(DistanceMatrix, 0);
1818
this.numberofvertices = numberofvertices;
1919
}

DataStructures/Heaps/HeapElement.java

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package DataStructures.Heaps;
22

3-
43
/**
54
* Class for heap elements.<br>
65
*

DataStructures/Lists/SinglyLinkedList.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,12 @@ public void insertNth(int data, int position) {
6161
checkBounds(position, 0, size);
6262
Node newNode = new Node(data);
6363
if (head == null) {
64-
/* the list is empty */
64+
/* the list is empty */
6565
head = newNode;
6666
size++;
6767
return;
6868
} else if (position == 0) {
69-
/* insert at the head of the list */
69+
/* insert at the head of the list */
7070
newNode.next = head;
7171
head = newNode;
7272
size++;

Others/BestFit.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ private static int findBestFit(int[] blockSizes, int processSize) {
3838
int minDiff = findMaxElement(blockSizes);
3939
int index =
4040
NO_ALLOCATION; // If there is no block that can fit the process, return NO_ALLOCATION as the
41-
// result.
41+
// result.
4242
for (int i = 0;
4343
i < blockSizes.length;
4444
i++) { // Find the most fitting memory block for the given process.

Others/GuassLegendre.java

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package Others;
22

3-
43
/**
54
* Guass Legendre Algorithm ref https://en.wikipedia.org/wiki/Gauss–Legendre_algorithm
65
*

Others/ReturnSubsequence.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static void main(String[] args) {
2323
private static String[] returnSubsequence(String givenString) {
2424
if (givenString.length()
2525
== 0) // If string is empty we will create an array of size=1 and insert "" (Empty string)
26-
// in it
26+
// in it
2727
{
2828
String[] ans = new String[1];
2929
ans[0] = "";
@@ -33,7 +33,7 @@ private static String[] returnSubsequence(String givenString) {
3333
returnSubsequence(
3434
givenString.substring(
3535
1)); // recursive call to get subsequences of substring starting from index
36-
// position=1
36+
// position=1
3737

3838
String[] ans =
3939
new String
@@ -47,7 +47,7 @@ private static String[] returnSubsequence(String givenString) {
4747
givenString.charAt(0)
4848
+ SmallAns[
4949
k]; // Insert character at index=0 of the given substring in front of every string
50-
// in SmallAns
50+
// in SmallAns
5151
}
5252
return ans;
5353
}

Searches/JumpSearch.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public <T extends Comparable<T>> int find(T[] array, T key) {
3131

3232
for (int i = limit - blockSize; i <= limit; i++) {
3333
if (array[i] == key) {
34-
/* execute linear search */
34+
/* execute linear search */
3535
return i;
3636
}
3737
}

0 commit comments

Comments
 (0)