Loading

Quipoin Menu

Learn • Practice • Grow

data-structure-with-java / Graph Introduction
tutorial

Graph Introduction

A graph is a non-linear data structure consisting of vertices (nodes) and edges (connections). It is used to model networks: social networks, maps, computer networks, and more.

Graphs can be:
  • Directed – edges have direction (like one-way streets).
  • Undirected – edges are bidirectional (like friendships).
  • Weighted – edges have weights (like distances).
  • Unweighted – all edges are equal.

Common graph terms:
  • Vertex/Node – a point in the graph.
  • Edge – connection between vertices.
  • Degree – number of edges incident to a vertex (for directed: in-degree, out-degree).
  • Path – sequence of vertices connected by edges.
  • Cycle – path that starts and ends at same vertex.
Two Minute Drill
  • Graphs consist of vertices and edges.
  • Types: directed, undirected, weighted, unweighted.
  • Used to model relationships and networks.
  • Key terms: degree, path, cycle.

Need more clarification?

Drop us an email at career@quipoinfotech.com