gdgpce/DSA-Challenges-2024

Midway of a Linked List

オープン

#7 opened on 2024/10/06

 (4 件のコメント) (0 件のリアクション) (1 人の担当者)C++ (12 件のフォーク)auto 404
good first issuehacktoberfest

Repository metrics

Stars
 (2 個のスター)
PR merge metrics
 (PR metrics pending)

説明

Problem: Given the head of a singly linked list, find and return the middle node. In cases where the list has an even number of nodes, return the second middle node.

The predefined Linked List structure is as follows:

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

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

Follow and Read the Contributing Guidelines.

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

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.

コントリビューターガイド