Added Dummy head to avoid Undefined Error

This commit is contained in:
Omkarnath Parida
2020-10-04 23:55:40 +05:30
parent 48c7bab832
commit e31390f0a0

View File

@ -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