Can someone explain about Floyd tortoise and hare algorithm below?

前端 未结 0 1369
一整个雨季
一整个雨季 2020-11-27 04:54

Why do i get error if i do not check while condition with hare and hare.next?


if not head:
            return
        
        tor = head
        hare = head         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题