in the statement m[temp]==true what if the garbage value taken by the compiler is true but actually the address does not repeat?
Check cycle in linked list issue
should not we use the count function instead of checking whether the value is true?
See by default the value initialized is 0(False). So m[temp] will be only true when we have already visited temp.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.