From 5a68ba93998c1ec4d0a201aba7e3d0ed942ae4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=AA=20Nam=20Kh=C3=A1nh?= <55955273+khanhkhanhlele@users.noreply.github.com> Date: Thu, 6 Nov 2025 17:40:34 +0700 Subject: [PATCH] chore: fix typos in some files (#7052) Fix typos in some files --- .../java/com/thealgorithms/datastructures/lists/README.md | 2 +- .../java/com/thealgorithms/devutils/nodes/LargeTreeNode.java | 4 ++-- src/main/java/com/thealgorithms/others/CRCAlgorithm.java | 4 ++-- .../searches/RowColumnWiseSorted2dArrayBinarySearch.java | 2 +- src/main/java/com/thealgorithms/sorts/LinkListSort.java | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/com/thealgorithms/datastructures/lists/README.md b/src/main/java/com/thealgorithms/datastructures/lists/README.md index 5a19c3bfa..5a0a43b92 100644 --- a/src/main/java/com/thealgorithms/datastructures/lists/README.md +++ b/src/main/java/com/thealgorithms/datastructures/lists/README.md @@ -28,6 +28,6 @@ The `next` variable points to the next node in the data structure and value stor 4. `CreateAndDetectLoop.java` : Create and detect a loop in a linked list. 5. `DoublyLinkedList.java` : A modification of singly linked list which has a `prev` pointer to point to the previous node. 6. `MergeKSortedLinkedlist.java` : Merges K sorted linked list with mergesort (mergesort is also the most efficient sorting algorithm for linked list). -7. `RandomNode.java` : Selects a random node from given linked list and diplays it. +7. `RandomNode.java` : Selects a random node from given linked list and displays it. 8. `SkipList.java` : Data Structure used for storing a sorted list of elements with help of a Linked list hierarchy that connects to subsequences of elements. 9. `TortoiseHareAlgo.java` : Finds the middle element of a linked list using the fast and slow pointer (Tortoise-Hare) algorithm. diff --git a/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java b/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java index 95d53ecb1..d69288f72 100644 --- a/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java +++ b/src/main/java/com/thealgorithms/devutils/nodes/LargeTreeNode.java @@ -3,7 +3,7 @@ package com.thealgorithms.devutils.nodes; import java.util.Collection; /** - * {@link TreeNode} extension that holds a {@link Collection} of refrences to + * {@link TreeNode} extension that holds a {@link Collection} of references to * child Nodes. * * @param The type of the data held in the Node. @@ -18,7 +18,7 @@ public class LargeTreeNode extends TreeNode { private Collection> childNodes; /** - * Empty contructor. + * Empty constructor. */ public LargeTreeNode() { super(); diff --git a/src/main/java/com/thealgorithms/others/CRCAlgorithm.java b/src/main/java/com/thealgorithms/others/CRCAlgorithm.java index 00ddc86be..2d0be15e0 100644 --- a/src/main/java/com/thealgorithms/others/CRCAlgorithm.java +++ b/src/main/java/com/thealgorithms/others/CRCAlgorithm.java @@ -95,7 +95,7 @@ public class CRCAlgorithm { /** * Resets some of the object's values, used on the main function, so that it - * can be re-used, in order not to waste too much memory and time, by + * can be reused, in order not to waste too much memory and time, by * creating new objects. */ public void refactor() { @@ -171,7 +171,7 @@ public class CRCAlgorithm { * Once the message is transmitted, some of it's elements, is possible to * change from 1 to 0, or from 0 to 1, because of the Bit Error Rate (ber). * For every element of the message, a random double number is created. If - * that number is smaller than ber, then the spesific element changes. On + * that number is smaller than ber, then the specific element changes. On * the other hand, if it's bigger than ber, it does not. Based on these * changes. the boolean variable messageChanged, gets the value: true, or * false. diff --git a/src/main/java/com/thealgorithms/searches/RowColumnWiseSorted2dArrayBinarySearch.java b/src/main/java/com/thealgorithms/searches/RowColumnWiseSorted2dArrayBinarySearch.java index b40c7554d..ecdcd36ad 100644 --- a/src/main/java/com/thealgorithms/searches/RowColumnWiseSorted2dArrayBinarySearch.java +++ b/src/main/java/com/thealgorithms/searches/RowColumnWiseSorted2dArrayBinarySearch.java @@ -13,7 +13,7 @@ import com.thealgorithms.devutils.searches.MatrixSearchAlgorithm; * In this two pointers are taken, the first points to the 0th row and the second one points to end * column, and then the element corresponding to the pointers placed in the array is compared with * the target that either its equal, greater or smaller than the target. If the element is equal to - * the target, the co-ordinates of that element is returned i.e. an array of the two pointers will + * the target, the coordinates of that element is returned i.e. an array of the two pointers will * be returned, else if the target is greater than corresponding element then the pointer pointing * to the 0th row will be incremented by 1, else if the target is lesser than the corresponding * element then the pointer pointing to the end column will be decremented by 1. And if the element diff --git a/src/main/java/com/thealgorithms/sorts/LinkListSort.java b/src/main/java/com/thealgorithms/sorts/LinkListSort.java index 800d78f36..d8fd76a86 100644 --- a/src/main/java/com/thealgorithms/sorts/LinkListSort.java +++ b/src/main/java/com/thealgorithms/sorts/LinkListSort.java @@ -106,7 +106,7 @@ public class LinkListSort { // The given array and the expected array is checked if both are same then true // is displayed else false is displayed default: - // default is used incase user puts a unauthorized value + // default is used in case user puts a unauthorized value System.out.println("Wrong choice"); } // Switch case is used to call the classes as per the user requirement