Search
⌘K

Design a Graph Storage and Cloning System

Design a class that can store a graph with edge and node relations and includes a method to clone the graph, returning a new copy. Candidates are expected to communicate their thought process and explain their code while developing. Once coding is complete, they should identify sufficient test cases to cover all important scenarios and trace the code using one or two of them.

Asked at:

Meta


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Late May, 2025

Meta

Senior

Mid February, 2025

Meta

Mid-level

Late July, 2024

Meta

Senior

Candidates are expected to communicate (speak out loud) and convey what they are coding (presenting while coding). Once coding is complete, we should call out enough test cases to cover all important scenarios, trace the code using one or two of them.

Comments

Your account is free and you can post anonymously if you choose.