You are viewing a single comment's thread. Return to all comments →
I Guess this will be the simplest in python....
def has_cycle(head): if head.next == None: return 0 else: return 1
Seems like cookies are disabled on this browser, please enable them to open this website
Cycle Detection
You are viewing a single comment's thread. Return to all comments →
I Guess this will be the simplest in python....