Write a program to check if there is a loop in a linked


Question-a Write a program to check if there is a loop in a linked list. Create a loop in a linked list and use your method 'isLoop' to identify that the loop exists. The method isLoop should return a Boolean type.

Question-b Write a program to find the middle element in a linked list in one pass.

You will use the same .cpp file as in the problem above, just prepare a proper linked list without loop and return the middle element by calling a function 'returnMiddleList'.

Request for Solution File

Ask an Expert for Answer!!
Data Structure & Algorithms: Write a program to check if there is a loop in a linked
Reference No:- TGS0966325

Expected delivery within 24 Hours