1. 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.2. Write a program to find the middle element in a linked list in one pass. You can use the same .cpp file as in the question above, just create a proper linked list without loop and return the middle element by calling a function 'returnMiddleList'.