CITS2002 Systems Programming  
prev
next CITS2002 CITS2002 schedule  

Problems with our list data structure

As written, our list data structure works, but also has a few problems:

  • Again, our list accessing functions use a single global variable.
  • What if our program required 2, or more, lists?
  • Continually searching for the end-of-list can become expensive.
  • Could the lists be manipulated by functions that didn't actually "understand" the data they were manipulating?

We'll address all of these by developing a similar first-in-first-out (FIFO) data structure, which we'll name a queue.

 


CITS2002 Systems Programming, Lecture 19, p12, 3rd October 2023.