My code is working for test case 0. But showing runtime error after submitting it. May be some error is there.
when u are performing pop operation make sure ur linked list is not empty. if it is empty then print