Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit0db62bb

Browse files
github-actionsgithub-actions
github-actions
authored and
github-actions
committed
Formatted with Google Java Formatter
1 parentd27ded9 commit0db62bb

File tree

9 files changed

+12
-14
lines changed

9 files changed

+12
-14
lines changed

‎Conversions/HexToOct.java‎

Lines changed: 1 addition & 1 deletion
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‎

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

4949
publicvoid
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
Scannersc =newScanner(System.in);// Grab scanner object for user input
5454
inti,v,e,u,ve,w,j,neg =0;
@@ -66,7 +66,7 @@ public static void main(String args[]) {
6666
intdist[] =
6767
newint
6868
[v];// Distance array for holding the finalized shortest path distance between source
69-
// and all vertices
69+
// and all vertices
7070
intp[] =newint[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
doubledist[] =
116116
newdouble
117117
[v];// Distance array for holding the finalized shortest path distance between source
118-
// and all vertices
118+
// and all vertices
119119
intp[] =newint[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‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public FloydWarshall(int numberofvertices) {
1313
newint[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‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
packageDataStructures.Heaps;
22

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

‎DataStructures/Lists/SinglyLinkedList.java‎

Lines changed: 2 additions & 2 deletions
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
NodenewNode =newNode(data);
6363
if (head ==null) {
64-
/* the list is empty */
64+
/* the list is empty */
6565
head =newNode;
6666
size++;
6767
return;
6868
}elseif (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‎

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

‎Others/GuassLegendre.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
packageOthers;
22

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

‎Others/ReturnSubsequence.java‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static void main(String[] args) {
2323
privatestaticString[]returnSubsequence(StringgivenString) {
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 =newString[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
newString
@@ -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
returnans;
5353
}

‎Searches/JumpSearch.java‎

Lines changed: 1 addition & 1 deletion
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 (inti =limit -blockSize;i <=limit;i++) {
3333
if (array[i] ==key) {
34-
/* execute linear search */
34+
/* execute linear search */
3535
returni;
3636
}
3737
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp