Data structures and algorithms

A good knowledge of data structures and algorithms is key to solving difficult problems as a programmer.

Table of contents

  1. Data structures
    1. Abstract data types
  2. Algorithms
  3. References

Data structures

A data structures is a representation of data and a collection of associated operations [1, P. 5].

Data structures are implementations of abstract data types [1, P. 4].

Abstract data types

ADTs (Abstract Data Types) define the set of operations supported by a data structure [1, P. 4].

An ADT is the interface of a data structure, it doesn’t define how a data structure implements the operations [1, P. 4].

There can be many implementations of an ADT [1, P. 4].


An algorithm is a procedure that takes input and produces output that accomplishes a specific task [2, P. 3].

An algorithm should solve a general, well-specified problem. A specification for an algorithm should include the complete set of instances it will operate on, and the algorithms output after running on one of these instances [2, P. 3].

A good algorithm is:

  • Correct
  • Efficient
  • Easy to implement

It’s often not possible to achieve all three aims.


  1. [1] P. Morin, Open Data Structures, 1st ed. AU Press, 2013.
  2. [2] S. Skiena, The Algorithm Design Manual, 2nd ed. Springer, 2008.