Problem
Java
Two pointers
1 | /** |
Submission Detail
- 17 / 17 test cases passed.
- Runtime: 0 ms, faster than 100.00% of Java online submissions for Linked List Cycle.
- Memory Usage: 39.3 MB, less than 12.07% of Java online submissions for Linked List Cycle.
extra space
1 | import java.util.HashSet; |
Submission Detail
- 17 / 17 test cases passed.
- Runtime: 3 ms, faster than 19.93% of Java online submissions for Linked List Cycle.
- Memory Usage: 39.5 MB, less than 11.80% of Java online submissions for Linked List Cycle.