Skip to content

Commit 98fbea9

Browse files
feat: add palindrome check for linked lists and find lowest base palindrome implementation
1 parent cfec269 commit 98fbea9

8 files changed

Lines changed: 20 additions & 6 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.thealgorithms.misc;
1+
package com.thealgorithms.datastructures.lists;
22

33
import java.util.Stack;
44

src/main/java/com/thealgorithms/maths/LowestBasePalindrome.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.thealgorithms.others;
1+
package com.thealgorithms.maths;
22

33
import java.util.ArrayList;
44
import java.util.List;

src/main/java/com/thealgorithms/maths/PalindromePrime.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.thealgorithms.misc;
1+
package com.thealgorithms.maths;
22

33
import java.util.ArrayList;
44
import java.util.List;

src/main/java/com/thealgorithms/stacks/PalindromeWithStack.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
* which we will pop one-by-one to create the string in reverse.
99
*
1010
* Reference: https://www.geeksforgeeks.org/check-whether-the-given-string-is-palindrome-using-stack/
11+
*
12+
* @see com.thealgorithms.strings.Palindrome
13+
* @see com.thealgorithms.bitmanipulation.BinaryPalindromeCheck
14+
* @see com.thealgorithms.maths.LowestBasePalindrome
15+
* @see com.thealgorithms.datastructures.lists.PalindromeSinglyLinkedList
16+
* @see com.thealgorithms.maths.PalindromePrime
17+
* @see com.thealgorithms.maths.PalindromeNumber
1118
*/
1219
public class PalindromeWithStack {
1320
private LinkedList<Character> stack;

src/main/java/com/thealgorithms/strings/Palindrome.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
/**
44
* Wikipedia: https://en.wikipedia.org/wiki/Palindrome
5+
*
6+
* @see com.thealgorithms.stacks.PalindromeWithStack
7+
* @see com.thealgorithms.bitmanipulation.BinaryPalindromeCheck
8+
* @see com.thealgorithms.maths.LowestBasePalindrome
9+
* @see com.thealgorithms.datastructures.lists.PalindromeSinglyLinkedList
10+
* @see com.thealgorithms.maths.PalindromePrime
11+
* @see com.thealgorithms.maths.PalindromeNumber
512
*/
613
final class Palindrome {
714
private Palindrome() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.thealgorithms.misc;
1+
package com.thealgorithms.datastructures.lists;
22

33
import static org.junit.jupiter.api.Assertions.assertFalse;
44
import static org.junit.jupiter.api.Assertions.assertTrue;

src/test/java/com/thealgorithms/maths/LowestBasePalindromeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.thealgorithms.others;
1+
package com.thealgorithms.maths;
22

33
import java.util.ArrayList;
44
import java.util.Arrays;

src/test/java/com/thealgorithms/maths/PalindromePrimeTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package com.thealgorithms.misc;
1+
package com.thealgorithms.maths;
22

33
import static org.junit.jupiter.api.Assertions.assertEquals;
44
import static org.junit.jupiter.api.Assertions.assertFalse;

0 commit comments

Comments
 (0)