Skip to content

Commit e31390f

Browse files
committed
Added Dummy head to avoid Undefined Error
1 parent 48c7bab commit e31390f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Data-Structures/Linked-List/CycleDetection.js

+1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ function main () {
1515
1616
Link for the Problem: https://leetcode.com/problems/linked-list-cycle/
1717
*/
18+
const head = '' // Reference to head is given in the problem. So please ignore this line
1819
let fast = head
1920
let slow = head
2021

0 commit comments

Comments
 (0)