Skip to content

Latest commit

 

History

History
8 lines (6 loc) · 892 Bytes

FAQs.md

File metadata and controls

8 lines (6 loc) · 892 Bytes

Q: What is a Graph? A: A Graph is a data structure that models objects and pairwise relationships between them with nodes and edges. For example: Users and friendships, locations and paths between them, parents and children, etc.

Q: How many types of graphs are there? A: Graphs can be directed or undirected, cyclic or acyclic, weighted or unweighted. They can also be represented with different underlying structures including, but not limited to, adjacency lists, adjacency matrices, object and pointers, or a custom solution.

Q: What is the time complexity (big-O) to add/remove/get a vertex/edge for a graph? A: It depends on the implementation. (Graph Representations). Before choosing an implementation, it is wise to consider the tradeoffs and complexities of the most commonly used operations.