Introduction to Data Structures and Algorithms in C++

This introductory course will teach you how to implement some fundamental data structures and algorithms in C++ from scratch, with a combination of theoretical introduction using slides, and practical C++ implementation code.
Course info
Level
Intermediate
Updated
Oct 8, 2018
Duration
3h 29m
Table of contents
Course Overview
Safely Using Arrays
Improve Array Implementation
Efficiently Searching
Implementing a Last-in First-out Pattern with the Stack
Introducing Node-based Data Structures: Linked-lists
Description
Course info
Level
Intermediate
Updated
Oct 8, 2018
Duration
3h 29m
Description

Knowing some fundamental data structures and algorithms both in theory and from a practical implementation perspective helps you in being a better C++ programmer, gives you a good foundation to understand standard library’s containers and algorithms inner “under the hood” mechanics, and serves as a kind of knowledge that is required in several coding interviews, as well. In this course, Introduction to Data Structures and Algorithms in C++, you’ll learn how to implement some fundamental data structures and algorithms in C++ from scratch, with a combination of theoretical introduction using slides, and practical C++ implementation code as well. No prior data structure or algorithm theory knowledge is required. You only need a basic knowledge of C++ language features. First, you'll discover how to develop a C++ class to safely use arrays, with automatic memory management using constructor and destructor, and safely accessing array elements with bounds checking. Then, you’ll see how to further improve this array class, overloading the insertion operator to offer a simple nice idiomatic printing syntax for arrays, and optimizing the array class with move semantics. You’ll also learn how to properly copy arrays, and you’ll see the copy-and-swap idiom in action. Then, you’ll learn how to generalize the array class with templates. Next, you’ll learn about the Big O notation in a practical intuitive way, and you’ll apply that knowledge to a couple of search algorithms. You’ll start learning how to search using the simple linear search, and then you’ll see how to improve searching, using binary search. I’ll first introduce these algorithms using slides, and then you’ll see them in action in concrete C++ demo code. Finally, you’ll discover how to implement other common data structures, like the stack with its LIFO policy and push and pop operations, and linked lists, including operations like list node insertion and removal, and searching elements in a linked list. After completing this course, you will be able to implement some common fundamental data structures and algorithms from scratch in C++, you’ll have a practical understanding of the Big O notation to evaluate and compare algorithm performance trends, and you’ll see in action, several interesting C++ coding techniques that you’ll be able to reuse in your own C++ projects as well. Moreover, you will be able to use this foundational knowledge to move forward to more advanced C++ data structures and algorithms topics.

About the author
About the author

Giovanni Dicanio is a computer programmer specialized in both cross-platform C and C++, and Windows operating system development. He is a Microsoft MVP for Visual C++. He also blogs on msmvps.com/gdicanio.

More from the author
Practical C++14 and C++17 Features
Intermediate
2h 33m
11 Dec 2017
C++11 from Scratch
Beginner
5h 48m
24 Apr 2017
Getting Started With Cinder
Intermediate
7h 2m
14 Nov 2014