Linked List cycle
Given a linked list, determine if it has a cycle in it.
Follow up: Can you solve it without using extra space?
快慢指针,有环的话总会相遇。while的条件还是指针是否Null
Last updated
Given a linked list, determine if it has a cycle in it.
Follow up: Can you solve it without using extra space?
快慢指针,有环的话总会相遇。while的条件还是指针是否Null
Last updated