Why this code is not working?
Hey @amansanyam,
In create function you do are making a linked list but you’re not creating a loop in it.
Ex- 1->2->3 and now last element will point back to the first element, then only it’ll create a loop.
Your create function just takes all the elements in order and makes a linked list in linear manner.
However, the logic for removing loop is fine in your code.