Chapter 6, 7 Algorithm design with Sequential Data Structure

Background

The algorithms covered in this course is mostly C array based. C array as the fundamental native sequential data structure in C++ is a perfect data structure to learn algorithms.

Most of the algorithms are based on one dimensional arrays and these algorithms can be easily extended to other sequential data structures such as std::string, C string (chapter 7), std::vector (chapter 11), etc.

Some simple algorithms based on two dimensional arrays are also covered in this course (chapter 8).

Designing algorithms

  • pseudo-code like a recipe

  • top-down method

    • describe how you solve the problem

    • identify top-level tasks

    • split further into smaller tasks

Topics