Code will check whether two linked lists are identical or not