Last case is showing TLE


Kindly check the code

There are many mistakes in your code such as
In function haven’t defined base case.

If(head==null or head->next ==null)
Return false

Refer this code https://ide.codingblocks.com/s/353950 as it’s been coded by me and it will surely help you in understanding This problem In a better way :slight_smile: