mirror of
https://github.com/20kaushik02/leetcode-gulag.git
synced 2025-12-06 06:24:07 +00:00
24 lines
286 B
C++
24 lines
286 B
C++
#include <bits/stdc++.h>
|
|
using namespace std;
|
|
|
|
class Node
|
|
{
|
|
public:
|
|
int val;
|
|
Node *next;
|
|
Node *random;
|
|
|
|
Node(int _val)
|
|
{
|
|
val = _val;
|
|
next = NULL;
|
|
random = NULL;
|
|
}
|
|
};
|
|
|
|
class Solution
|
|
{
|
|
public:
|
|
void insertNode(Node *head, Node *newnode);
|
|
Node *copyRandomList(Node *head);
|
|
}; |