Essential algorithms for GCSE and A Level Computer Science
Higher order data structures
Supported by some programming languages within the command set, programmers often implement these structures using the fundamental data structures as building blocks.
What is a graph?
A graph is a data structure consisting of nodes (vertices) and pointers (edges). It differs from a linked list and binary tree because each vertex can have more than one or two edges and point to any vertex in the data structure. The edges can either point in one direction, known as a directed graph, or without specifying a direction (bidirectional), referred to as an undirected graph.
Graphs can also be weighted, with each edge given a value representing a relationship such as distance between the vertices.
Although it is common to refer to vertices and edges when discussing graphs, this is largely due to their application in mathematics. A vertex can also be referred to as a node and an edge as a pointer.
What extra is in the book?
This algorithm / data structure has its own dedicated chapter in the book, which includes:
A hard copy of the book is available on our shop and a free PDF copy is included for all premium subscribers.