Skip to Main Content
It looks like you're using Internet Explorer 11 or older. This website works best with modern browsers such as the latest versions of Chrome, Firefox, Safari, and Edge. If you continue with this browser, you may see unexpected results.
| Brooklyn College Library & Academic IT |CISC Department

CISC 3130 Data Structures: Graphs

Professor Chuang Spring 2020 OER


Definition: A set of items connected by edges. Each item is called a vertex or node. Formally, a graph is a set of vertices and a binary relation between vertices, adjacency.


Black, Paul E. (2019-10-1). Pieterse, Vreda; Black, Paul E. (eds.). "dictionary".Dictionary of Algorithms and Data Structures. National Institute of Standards and Technology. Retrieved from:


Graph Data Structure

Java Implementation

A node that features a String label.

class Node {
    String label;
    Node(String label) {
        this.label = label;

Here's how we can implement a graph as an adjacency list.

class Graph {
    private Map> adjVertices;