Design a graph-based system
Design a graph-based system with two types of nodes connected by edges. The system should support different node types and maintain relationships between them through a flexible edge structure.
Asked at:
Microsoft
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
Late December, 2025
Microsoft
Mid-level
In the system, each node could be one of two types, and there is an edges that connect between them. I implemented a base class for the edges then inherate it to create the two types, last I used the class in the edge to descripe an edge between two nodes.
Your account is free and you can post anonymously if you choose.