Skip to content

Commit d44b65b

Browse files
authored
Merge branch 'master' into src/main/java/com/thealgorithms/devutils/nodes/SimpleTreeNode.java
2 parents 8adc75f + 8ae5747 commit d44b65b

File tree

18 files changed

+33
-33
lines changed

18 files changed

+33
-33
lines changed

src/main/java/com/thealgorithms/conversions/TurkishToLatinConversion.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ private TurkishToLatinConversion() {
1616
* 2. Replace all turkish characters with their corresponding latin characters
1717
* 3. Return the converted string
1818
*
19-
* @param param String paramter
19+
* @param param String parameter
2020
* @return String
2121
*/
2222
public static String convertTurkishToLatin(String param) {

src/main/java/com/thealgorithms/datastructures/graphs/BellmanFord.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ public void show(int source, int end,
160160
break;
161161
}
162162
}
163-
if (neg == 0) { // Go ahead and show results of computaion
163+
if (neg == 0) { // Go ahead and show results of computation
164164
System.out.println("Distance is: " + dist[end]);
165165
System.out.println("Path followed:");
166166
System.out.print(source + " ");

src/main/java/com/thealgorithms/datastructures/graphs/MatrixGraphs.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ private int[][] adjacency() {
141141
*
142142
* @param from the parent vertex to check for adjacency
143143
* @param to the child vertex to check for adjacency
144-
* @return whether or not the vertices are adjancent
144+
* @return whether or not the vertices are adjacent
145145
*/
146146
private boolean adjacencyOfEdgeDoesExist(int from, int to) {
147147
return (this.adjacency()[from][to] != AdjacencyMatrixGraph.EDGE_NONE);
@@ -162,7 +162,7 @@ public boolean vertexDoesExist(int aVertex) {
162162
*
163163
* @param from the parent vertex to check for adjacency
164164
* @param to the child vertex to check for adjacency
165-
* @return whether or not the vertices are adjancent
165+
* @return whether or not the vertices are adjacent
166166
*/
167167
public boolean edgeDoesExist(int from, int to) {
168168
if (this.vertexDoesExist(from) && this.vertexDoesExist(to)) {

src/main/java/com/thealgorithms/datastructures/queues/PriorityQueues.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* give numbers that are bigger, a higher priority. Queues in theory have no
1010
* fixed size but when using an array implementation it does.
1111
* <p>
12-
* Additional contibutions made by: PuneetTri(https://github.com/PuneetTri)
12+
* Additional contributions made by: PuneetTri(https://github.com/PuneetTri)
1313
*/
1414
class PriorityQueue {
1515

@@ -32,8 +32,8 @@ class PriorityQueue {
3232

3333
PriorityQueue() {
3434
/* If capacity is not defined, default size of 11 would be used
35-
* capacity=max+1 because we cant access 0th element of PQ, and to
36-
* accomodate (max)th elements we need capacity to be max+1.
35+
* capacity=max+1 because we can't access 0th element of PQ, and to
36+
* accommodate (max)th elements we need capacity to be max+1.
3737
* Parent is at position k, child at position (k*2,k*2+1), if we
3838
* use position 0 in our queue, its child would be at:
3939
* (0*2, 0*2+1) -> (0,0). This is why we start at position 1
@@ -127,7 +127,7 @@ public int remove() {
127127
if (isEmpty()) {
128128
throw new RuntimeException("Queue is Empty");
129129
} else {
130-
int max = queueArray[1]; // By defintion of our max-heap, value at queueArray[1] pos is
130+
int max = queueArray[1]; // By definition of our max-heap, value at queueArray[1] pos is
131131
// the greatest
132132

133133
// Swap max and last element

src/main/java/com/thealgorithms/devutils/nodes/TreeNode.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
public abstract class TreeNode<E> extends Node<E> {
1313

1414
/**
15-
* Refernce to the parent Node.
15+
* Reference to the parent Node.
1616
*/
1717
private TreeNode<E> parentNode;
1818
/**
@@ -21,7 +21,7 @@ public abstract class TreeNode<E> extends Node<E> {
2121
private int depth;
2222

2323
/**
24-
* Empty contructor.
24+
* Empty constructor.
2525
*/
2626
public TreeNode() {
2727
super();

src/main/java/com/thealgorithms/divideandconquer/ClosestPair.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ public double closestPair(final Location[] a, final int indexNum) {
182182

183183
double minLeftArea; // Minimum length of left array
184184
double minRightArea; // Minimum length of right array
185-
double minValue; // Minimum lengt
185+
double minValue; // Minimum length
186186

187187
minLeftArea = closestPair(leftArray, divideX); // recursive closestPair
188188
minRightArea = closestPair(rightArray, indexNum - divideX);

src/main/java/com/thealgorithms/divideandconquer/SkylineAlgorithm.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public int getY() {
161161
* function dominates the argument point.
162162
*
163163
* @param p1 the point that is compared
164-
* @return true if the point wich calls the function dominates p1 false
164+
* @return true if the point which calls the function dominates p1 false
165165
* otherwise.
166166
*/
167167
public boolean dominates(Point p1) {

src/main/java/com/thealgorithms/maths/BinomialCoefficient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package com.thealgorithms.maths;
22

33
/*
4-
* Java program for Binomial Cofficients
5-
* Binomial Cofficients: A binomial cofficient C(n,k) gives number ways
4+
* Java program for Binomial Coefficients
5+
* Binomial Coefficients: A binomial coefficient C(n,k) gives number ways
66
* in which k objects can be chosen from n objects.
77
* Wikipedia: https://en.wikipedia.org/wiki/Binomial_coefficient
88
*

src/main/java/com/thealgorithms/maths/SieveOfAtkin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
public final class SieveOfAtkin {
1515

1616
private SieveOfAtkin() {
17-
// Utlity class; prevent instantiation
17+
// Utility class; prevent instantiation
1818
}
1919

2020
/**

src/main/java/com/thealgorithms/matrix/RotateMatrixBy90Degrees.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static void printMatrix(int[][] arr) {
4040
}
4141

4242
/**
43-
* Class containing the algo to roate matrix by 90 degree
43+
* Class containing the algo to rotate matrix by 90 degree
4444
*/
4545
final class Rotate {
4646
private Rotate() {

0 commit comments

Comments
 (0)