Essential algorithms and data structures

Data structures

A feature of imperative programming languages, these abstractions of memory allow for the creation of higher order data structures.

What is an object?

The first computers used arrays for storing data. By 1965, Simula had introduced a new way of programming using an object-oriented approach. Programs were built from fundamental constructs called objects.

An object has attributes (variables) and methods (subroutines). Like a record data structure, an object may contain many related attributes of different data types. Unlike records, attributes of an object can be public or private; a similar concept to the scope of a variable being global or local. Public attributes are like global variables and can be used and accessed by other objects. Private attributes can only be accessed by methods of the object – this is known as encapsulation.

Over the years, the concept of object-oriented programming (OOP) changed from its original intentions of self-contained data structures – messages being passed between objects – into a more complex model. Today, OOP includes many additional features like sub-classes, inheritance and polymorphism, which are beyond the scope of this book. Instead, we will look at how objects are used as data structures for algorithms.

Object videos

What extra is in the book?

Each algorithm / data structure has its own dedicated chapter in the book, which includes:

  1. Overview
  2. Typical applications / uses
  3. Typical operations
  4. The algorithm written out in simple-structured English
  5. The algorithm written out in pseudocode
  6. Full code listing in Python
  7. Additional code listings in Visual Basic and C# are also available to download
  8. Diagrammatic walk-through
  9. Efficiency discussion with reference to Big-O notation

A hard copy of the book is available on our shop and a free PDF copy is included for all premium subscribers.

Registered in England and Wales: 10442992

VAT Number: 290 9845 58

Telephone: 03330 164 059

Email: admin@craigndave.co.uk

BETT Finalists 2022
Teach Secondary Awards 2022 Finalist