gdgpce/DSA-Challenges-2024

Cycle Existence in Linked List

Offen

#8 geöffnet am 06.10.2024

 (2 Kommentare) (0 Reaktionen) (1 zugewiesene Person)C++ (12 Forks)auto 404
good first issuehacktoberfest

Repository-Metriken

Stars
 (2 Sterne)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Problem: Given a head/root node of a linked list, determine if it contains a cycle. Return true if cycle exists otherwise false.

class Node{
public:
    int val;
    Node* next;

    Node(int s){
        val = s;
        next = NULL;
    }
};

  1. Follow and Read the Contributing Guidelines.

  2. Only the assigned person is allowed to raise the PR on this Issue.

  3. To get this issue assigned to you comment on this issue, along with your name, branch and year.

Note: Make sure to put the question under the relevant folder structure, and then make another folder having the question name and inside that folder you can write your solution in any preferred language.

Contributor Guide