From b52fab8f6594f1d9bfcbc68f57f1f6966abc69b4 Mon Sep 17 00:00:00 2001 From: Udhay <72250606+Udhay-Brahmi@users.noreply.github.com> Date: Wed, 16 Dec 2020 08:03:28 +0530 Subject: [PATCH] Create Check if Linked List is Palindrome --- Check if Linked List is Palindrome | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Check if Linked List is Palindrome diff --git a/Check if Linked List is Palindrome b/Check if Linked List is Palindrome new file mode 100644 index 0000000..8a5ae96 --- /dev/null +++ b/Check if Linked List is Palindrome @@ -0,0 +1,15 @@ +bool isPalindrome(Node *head) +{ + //Your code here + string h=""; + while(head!=NULL){ + h+=to_string(head->data); + head=head->next; + } + int i=0,j=h.length()-1; + while(i