Back to Questions

Implement a Generic Graph Structure

79.4K viewsAsked at Stripe
Medium

Question Explain

Design a generic graph data structure using an Adjacency List (using Hash Maps or Lists). Implement methods for adding vertices, adding edges (undirected/directed), and checking connectivity.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Implement a Generic Graph Structure - Interview Question