Skip to content

[New Problem] <Clone a Graph> #406

Description

@aayushi-bhensdadia

📝 New Problem Idea

Problem Title:
Clone a Graph

Brief Statement:
Given a reference of a node in a connected undirected graph.

Return a deep copy(clone) of the graph.

Each node in the graph contains a value (int) and a list (List[Node]) of its neighbors.

class Node {
public int val;
public List neighbors;
}

  • Simple/Beginner
  • Medium/Logic
  • Hard/Optimized

Topic of this Problem

graph traversal bfs & dfs , hashmap

Metadata

Metadata

Labels

Level-2Level 2 contributionNew-problemSuggest a new DSA problem for inclusionStart Working2-3 days max to work on this Issue, while staying assigned.gssoc25Official gsssoc25 label, that marks the contribution.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions