Approach and Coverage
Explore the methodology and coverage of key data structures in C++, focusing on simplified code samples and performance metrics. Understand the design choices for interfaces and efficiency to build foundational knowledge for implementing and analyzing data structures in C++.
We'll cover the following...
Methodology
The code samples in this course are written in the C++ programming language. However, to make the course accessible to readers not familiar with all of C++ constructs and keywords, the code samples have been simplified. For example, a reader won’t find any of the keywords public, protected, private, or static. A reader also won’t find much discussion about class hierarchies. Which interfaces a particular class implements or which class it extends, if relevant to the discussion, should be clear from the accompanying text.
These conventions should make the code samples understandable by anyone with a background in any of the languages from the ALGOL tradition, including B, C, C++, C#, Objective-C, D, Java, JavaScript, and so on. Readers who want the full details of all implementations are encouraged to look at the c++ source code that accompanies this course.
This course mixes mathematical analyses of running times with C++ source code for the algorithms being analyzed. This means that some equations contain variables also found in the source code. These variables are typeset consistently, both within the source code and within equations. The most common such variable is the variable that, without exception, always refers to the number of items currently stored in the data structure.
List of data structures
The below tables summarize the performance of data structures in this course that implement each of the interfaces, List, USet, and SSet, described before.
-
denotes an amortized running time.
-
denotes an expected running time.
In the table shown below XFastTrie and YFastTrie is the structure that can only store w-bit integer data.
BTree denotes the running time in the external-memory model.
- This structure can only store w-bit integer data.
- This denotes the running time in the external-memory model.
Module relationships
The following illustration shows the dependencies between various modules in this course. A sold arrow shows a strong dependency of a module on the other one. A dashed arrow indicates only a weak dependency, in which only a small part of the module depends on another module or only the main results of the other module.