Not able to understand the question?

please tell how we can construct the circular link list here?

@namangarg31 just keep inserting at last and when found a element that already occurred before make the cycle there all input following that should also be taken but not important.
ex
1 2 3 4 5 2 3 3 2 2 -1
1->2->3->4->5->
after 5 it points to 2 as 2 occurs before .
(so just take input like array and iterate over it)
hope its clear if yes dont forget to hit like and mark resolved :smiley: