By Gudipati Ganesh Yaswanth Kumar
This packet of code helps to find whether a string is a palindrome or not. The process is performed with the help of a double-linked list in C++.
Double linked list
A double-linked list is a linked list with two links. One link pointing to the next node and the other link pointing to the previous node.
Here each node holds a character along with two links.
Palindrome
A string or word is said to be a palindrome if its spelling is the same from start to end and end to start.
Solving methodology
The input string is taken from the user.
Each character of a string will be stored in an individual node.
Then we will traverse from two directions one from starting point and the other from the end.
If the string satisfies the characteristics of palindrome then "String is a palindrome" will be displayed.
Else "String is not a palindrome" will be displayed.
Submitted by Gudipati Ganesh Yaswanth Kumar (GaneshGudipati)
Download packets of source code on Coders Packet
Comments