0:00 題目說明
1:32 思路解說
4:35 Python程式解說
6:31 解法複雜度分析
10:34 Java程式解說
Problem:https://leetcode.com/problems/linked-list-cycle/description/
Let us denote n as the total number of nodes in the linked list.
Time complexity : O(n)
Space complexity : O(1)
Code:
Python:https://github.com/kobukuro/leetcode/blob/master/problems/easy/linked_list_cycle_141/solution.py
Java:https://github.com/kobukuro/leetcode-java/blob/main/src/main/java/com/leetcode/easy/LinkedListCycle141.java