Skip to content

Commit 33631d6

Browse files
authored
Merge branch 'master' into src/main/java/com/thealgorithms/datastructures/trees/AVLSimple.java
2 parents 65e7423 + 0c277a1 commit 33631d6

22 files changed

+39
-39
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/heaps/FibonacciHeap.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ public class HeapNode {
387387
private HeapNode parent;
388388

389389
/*
390-
* a constructor for a heapNode withe key @param (key)
390+
* a constructor for a heapNode with key @param (key)
391391
* prev == next == this
392392
* parent == child == null
393393
*/

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/datastructures/trees/BSTRecursiveGeneric.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public BSTRecursiveGeneric() {
3030
}
3131

3232
/**
33-
* Displays the tree is a structed format
33+
* Displays the tree is a structured format
3434
*/
3535
public void prettyDisplay() {
3636
prettyDisplay(root, 0);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public class SimpleNode<E> extends Node<E> {
1515
private SimpleNode<E> nextNode;
1616

1717
/**
18-
* Empty contructor.
18+
* Empty constructor.
1919
*/
2020
public SimpleNode() {
2121
super();

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,16 @@
1111
public class SimpleTreeNode<E> extends TreeNode<E> {
1212

1313
/**
14-
* Refrence to the child Node on the left.
14+
* Reference to the child Node on the left.
1515
*/
1616
private SimpleTreeNode<E> leftNode;
1717
/**
18-
* Refrence to the child Node on the right.
18+
* Reference to the child Node on the right.
1919
*/
2020
private SimpleTreeNode<E> rightNode;
2121

2222
/**
23-
* Empty contructor.
23+
* Empty constructor.
2424
*/
2525
public SimpleTreeNode() {
2626
super();

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);

0 commit comments

Comments
 (0)