Skip to content

Palindrome Check Function for Linked Lists #656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
asmit27rai opened this issue Mar 18, 2025 · 1 comment · May be fixed by #657
Open

Palindrome Check Function for Linked Lists #656

asmit27rai opened this issue Mar 18, 2025 · 1 comment · May be fixed by #657

Comments

@asmit27rai
Copy link

Add Palindrome Check Function for Linked Lists

Description:
A palindrome check function is needed for linked lists to determine if the sequence of elements in the linked list reads the same forwards and backwards. This function should work for all types of linked lists (Singly, Doubly, Circular, etc.).

Proposed Solution:
Implement a is_palindrome method in the LinkedList class. This method will:

  1. Traverse the linked list and store the elements in a temporary array.
  2. Compare the array with its reverse to determine if it is a palindrome.
  3. Return True if the linked list is a palindrome, otherwise False.
@asmit27rai asmit27rai linked a pull request Mar 18, 2025 that will close this issue
@Donnoguy
Copy link

/assign

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants