Linked list doubt

Hi,
In the question to check whether a linked list is palindrome or not,how can we do this in singly linked list?
I think it is not possible.
thanks

@vatsal50 you can by maintaining a tail pointer .
compare head with tail if equal increase head and delete tail and so on.
if without tail it would be difficult
like using two loops length of ll is n first time iterate a temp pointer to n steps and check with head , if equal inc head and iterate to n-1 steps and so on…
hope its clear if yes dont forget to hit like and mark resolved :smiley:

hi ,
to delete last element, we need second last element,
so I think we have to find second last element again and again so that it can point to null.
is this the right way.
pls suggest if there is more efficient way.
thanks

@vatsal50 yes using two loops like i said the last way but it will be tough to implement