Skip to content

Commit e058065

Browse files
author
Krishnan M
committed
updated
1 parent 996eab9 commit e058065

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/test/java/com/thealgorithms/tree/BinarySearchTree.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ void testPopulateSortedAndBalanced() {
6565
void testHeightCalculation() {
6666
BinarySearchTree localBST = new BinarySearchTree();
6767
localBST.insert(10); // Root
68-
localBST.insert(5); // Left child
68+
localBST.insert(5); // Left child
6969
localBST.insert(15); // Right child
7070
assertEquals(0, localBST.height(localBST.getRoot().getLeft()), "Left child height should be 0");
7171
}
72-
72+
7373
/**
7474
* Tests if the BST is balanced.
7575
*/
@@ -149,11 +149,10 @@ void testInsertDuplicateValues() {
149149
int[] valuesWithDuplicates = {10, 20, 10, 30, 20};
150150
duplicateBST.populate(valuesWithDuplicates);
151151
assertFalse(duplicateBST.isEmpty(), "BST should not be empty after inserting duplicates");
152-
153152
duplicateBST.inOrder(); // Visual check if needed
154153
assertTrue(true, "BST handled duplicate values (check logic if duplicates are allowed)");
155154
}
156-
155+
157156
/**
158157
* Tests balanced population using sorted array.
159158
*/

0 commit comments

Comments
 (0)