The code is giving TLE error and do not print any thing

at line no 78
correct statement is temp=temp->next;

after that code will run fine