Topic outline

  • Unit 2: Introduction to Stacks and Queues

    This unit will introduce you to two basic Data Structures, Stacks and Queues, and identify the operations that must be provided with each Stack and Queue implementation. Students will also learn how arrays and circular arrays can be used to implement a Stack and a Queue and discuss the advantages and disadvantages of their use.

    Completing this unit should take approximately 3 hours.

    • Upon successful completion of this unit, you will be able to:

      • recognize and visualize stacks and queues.
        • define stack and queue.
        • list the operations common to stacks and queues.
        • list the operations unique to stacks and queues.
        • describe specific tasks to which stacks and queues are suited.
      • solve software requirements that require stacks or queues.
        • demonstrate the operations of stacks and queues.
        • present general-purpose designs for stack and queue.
        • apply stacks to a specific application.
        • apply queues to a specific application.
    • 2.1: Introduction to Lists

      • Read this short section about lists. Lists of things are common in everyday life. Organizing data that way in a computer's memory is one way we can get software to mimic a person's approach to task performance. When looking at stacks and queues, we start with lists because lists are what stacks and queues manipulate.

    • 2.2: Implementing Lists with Arrays

      • Read this section, which introduces arrays and then discusses a specific implementation that uses arrays. Do not read the section on linked lists; we will cover them later in the course. 

    • 2.3: Overview of Stacks and Queues

      • Read this introduction to stacks and queues.

      • 2.3.1: Introduction to Stacks

        • Read this introduction to stacks, which are also known as last-in/first-out lists.

        • Read section 4.2 on stacks. You will notice that this section is not nearly as long as the section on lists; this is because stacks are based on lists.

        • Equation parsing is one application of stacks, as explained on this page.

        • This page illustrates the basics of stacks via a simple program.

      • 2.3.2: Introduction to Queues

        • Read this introduction to queues, which are also known as first-in/first-out lists.

        • Read section 4.3 on queues, which discusses some modifications to the list implementation that help to facilitate queues.

        • Job scheduling is one application of queues, as explained on this page.
    • Unit 2 Assessment

      • Take this assessment to see how well you understood this unit.

        • This assessment does not count towards your grade. It is just for practice!
        • You will see the correct answers when you submit your answers. Use this to help you study for the final exam!
        • You can take this assessment as many times as you want, whenever you want.