mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-05 00:01:37 +08:00
Added Dummy head to avoid Undefined Error
This commit is contained in:
@ -15,6 +15,7 @@ function main () {
|
||||
|
||||
Link for the Problem: https://leetcode.com/problems/linked-list-cycle/
|
||||
*/
|
||||
const head = '' // Reference to head is given in the problem. So please ignore this line
|
||||
let fast = head
|
||||
let slow = head
|
||||
|
||||
|
Reference in New Issue
Block a user