Skip to content

Commit 2d72ae4

Browse files
author
albinsabu2023
committed
updated CreateAndDetectLoop with test
1 parent 79fd8e3 commit 2d72ae4

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/main/java/com/thealgorithms/datastructures/lists/CreateAndDetectLoop.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,5 @@ static boolean detectLoop(Node head) {
7676
}
7777
return false;
7878
}
79+
7980
}

src/test/java/com/thealgorithms/datastructures/lists/CreateAndDetectLoopTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ void testCreateLoopNoChangeForNonExistentPositions() {
6868
// Ensure no loop was created
6969
assertFalse(CreateAndDetectLoop.detectLoop(head), "No loop should be created if positions are out of bounds.");
7070
}
71+
7172
}

0 commit comments

Comments
 (0)