What are some different types of graphs?

Quick Overview

Describe the main types of graphs and the properties used to classify them. Tests graph vocabulary and whether a candidate can match a problem to the right graph model, representation and algorithm.

What are some different types of graphs?

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: easy

Interview Round: Other

What are some different types of graphs? Describe the main properties used to classify graphs and what each one means. ```hint Think in properties Look at the questions you can ask about a single edge (does it have a direction, does it have a cost?) and about the whole graph (can you get from any node to any other, can you come back to where you started?). ``` ### What a Strong Answer Covers - Classification by edges: direction, weights, and parallel edges or self-loops - Classification by structure: cycles, connectivity, and special shapes such as trees, DAGs and bipartite graphs - Sparse versus dense graphs and how density drives the choice of representation - How the type of graph changes which algorithm applies ### Follow-up Questions - How do you detect whether a directed graph has a cycle? - How do you check whether a graph is bipartite? - When would you store a graph as an adjacency matrix instead of adjacency lists? - What is the difference between a strongly connected and a weakly connected directed graph?

Overview: Describe the main types of graphs and the properties used to classify them. Tests graph vocabulary and whether a candidate can match a problem to the right graph model, representation and algorithm.

PracHub logo
General
Nov 24, 2026
easySoftware EngineerOtherSoftware Engineering Fundamentals
0
0

What are some different types of graphs? Describe the main properties used to classify graphs and what each one means.

What a Strong Answer Covers Guidance

  • Classification by edges: direction, weights, and parallel edges or self-loops
  • Classification by structure: cycles, connectivity, and special shapes such as trees, DAGs and bipartite graphs
  • Sparse versus dense graphs and how density drives the choice of representation
  • How the type of graph changes which algorithm applies

Follow-up Questions Guidance

  • How do you detect whether a directed graph has a cycle?
  • How do you check whether a graph is bipartite?
  • When would you store a graph as an adjacency matrix instead of adjacency lists?
  • What is the difference between a strongly connected and a weakly connected directed graph?