![]() |
CITS2002 Systems Programming |
← prev | next → | ![]() |
![]() |
|||
Problems with our stack data structureAs written, our stack data structure works, but may be difficult to deploy in a large program.In particular, the whole stack was represented by a single global pointer variable, and all functions accessed or modified that global variable.
Ideally we'd re-write all of our functions, push_item, push_item, and print_stack so that they received the required stack as a parameter, and used or manipulated that stack. Techniques on how, and why, to design and implement robust data structures are a focus of the unit CITS2200 Data Structures & Algorithms.
CITS2002 Systems Programming, Lecture 19, p8, 3rd October 2023.
|