category-wise-problems

contains category wise problems(data structures, competitive) of popular platforms.

View the Project on GitHub mayankdutta/category-wise-problems

141. Linked List Cycle, Easy

Code ```cpp bool hasCycle(ListNode *head) { if (!head) return false; auto s = head; auto f = head; while (f -> next and f -> next -> next) { s = s -> next; f = f -> next -> next; if (s == f) return true; } return false; } ```