mirror of
https://github.com/TheAlgorithms/Java.git
synced 2026-03-13 08:40:43 +08:00
Cleanup PalindromeSinglyLinkedList (#4336)
This commit is contained in:
@@ -28,6 +28,17 @@ public class PalindromeSinglyLinkedListTest {
|
||||
assertTrue(PalindromeSinglyLinkedList.isPalindrome(exampleList));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithListWithOddLengthPositive2() {
|
||||
var exampleList = new SinglyLinkedList();
|
||||
exampleList.insert(3);
|
||||
exampleList.insert(2);
|
||||
exampleList.insert(1);
|
||||
exampleList.insert(2);
|
||||
exampleList.insert(3);
|
||||
assertTrue(PalindromeSinglyLinkedList.isPalindrome(exampleList));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithListWithEvenLengthPositive() {
|
||||
var exampleList = new SinglyLinkedList();
|
||||
|
||||
Reference in New Issue
Block a user