CS 2C: Adv Data Structures & Algorithms in C++
Lesson 21: Stacks
Skip to Main Content
syllabus
projects
27.1: containers
27.2: containers
27.3: containers
27.4: containers
27.5: containers
30.1: sorting
26.1: list
26.2: list
32.1: stacks
32.2: stacks
32.3: stacks
33.1: queues
33.2: queues
33.3: queues
34.1: hashing
35.1: BST
36.1: balanced
37.1: heaps
37.2: heaps
37.3: heaps
lessons
1: basics 1
2: basics 2
3: Decisions
4: Loops 1
5: Loops 2
6: Functions 1
7: Functions 2
8: Functions 3
9: Arrays
10: 2D Arrays
12: pointers
15: intro classes
16: more classes
17: classes + DM
18: inheritance
19: templates etc
20: linked
21: stacks
22: recursion
23: trees
24: sorting
There's no typed up lesson this week. Here are the code examples from the Lesson 21 video:
stackclient.cpp
mystack-array.h (array implementation)
mystack-array.cpp (array implementation)
mystack-ll.h (linked list implementation)
. The implementation is included in the header file on this one.