This part contains the annotated code for the various data structures and algorithms we discuss in the course. Use the side bar for navigation.

Since many of the data structures and algorithms are already implemented in the C++ Standard Template Library(STL) most topics have two versions: the one that uses the STL implementation which is prefixed by STL, and the second is our own implementation.

The complete source code can be found here Note: all header files are in the include directory. To build the code create a build directory then cd to it and type

cmake ..

This will create a Visual C++ solution containing multiple projects where each project is an example we discuss in class. Note that many of these projects use different portions of the same source file. Each example is “activated” by enabling a different preprocessor variable. If you select an example project you will see that only the relevant portion of the code is highlighted (i.e. “enabled”) by defining (i.e. #define) a corresponding preprocessor variable and the rest is not.

If you are using Xcode on Mac then type

cmake -G Xcode ..


Next section: