Challenge: Find If a Doubly Linked List Is a Palindrome

Try to solve the Doubly Linked List is a Palindrome problem.

We'll cover the following

Statement

Given the head of a doubly linked list, check whether the doubly linked list is a palindrome or not. Return TRUE if it is a palindrome; otherwise, return FALSE.

palindrome is any string or sequence that reads the same from both ends. For example, 2002 is a palindrome.

Constraints:

Let n be the number of nodes in a doubly linked list.

  • 11 \leq n 500\leq 500

  • 11 \leq node.data 100\leq 100

Examples

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.