paint-brush
Detecting Linked List Cycle. (LeetCode)by@akankov
3,976 reads
3,976 reads

Detecting Linked List Cycle. (LeetCode)

by Aleksei Kankov3mNovember 16th, 2022
Read on Terminal Reader
Read this story w/o Javascript
tldt arrow

Too Long; Didn't Read

Given head, the head of a linked list, determine if the linked list has a cycle in it. There is a cycle in a linked list if there is some node in the list that can be reached again by continuously following the next pointer. Internally, pos is used to denote the index of the node that tail's next pointer is connected to. Note that pos is not passed as a parameter.
featured image - Detecting Linked List Cycle. (LeetCode)
Aleksei Kankov HackerNoon profile picture
Aleksei Kankov

Aleksei Kankov

@akankov

Convert coffee into code )

About @akankov
LEARN MORE ABOUT @AKANKOV'S
EXPERTISE AND PLACE ON THE INTERNET.
L O A D I N G
. . . comments & more!

About Author

Aleksei Kankov HackerNoon profile picture
Aleksei Kankov@akankov
Convert coffee into code )

TOPICS

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite