We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
You don't need to compare data as in a cyclic loop all entries may be different(explained in 2nd test case).
My code iff you want to check-
Node current=head;
for(int i=0;i<100;i++){
Cycle Detection
You are viewing a single comment's thread. Return to all comments →
You don't need to compare data as in a cyclic loop all entries may be different(explained in 2nd test case). My code iff you want to check- Node current=head; for(int i=0;i<100;i++){