menu
techminis

A naukri.com initiative

google-web-stories
Home

>

Programming News

>

Given a li...
source image

Prodevelopertutorial

1w

read

207

img
dot

Given a linked list, check if it is a palindrome or not. Solution in C++

  • To check if a linked list is a palindrome, the linked list is divided into two halves.
  • The first half is left as it is, and the second half is reversed.
  • Then, the values of the corresponding nodes in both halves are compared.
  • If values don't match for any pair, the linked list is not a palindrome.

Read Full Article

like

12 Likes

For uninterrupted reading, download the app