Here\'s my code. The concept is to traverse the whole linkedlist by taking two pointers fast and slow ,once slow is at the middle ,will reverse the list and compare it