O'Reilly logo

Advanced Topics in Java: Core Concepts in Data Structures by Noel Kalicharan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

Stacks and Queues

In this chapter, we will explain the following:

  • The notion of an abstract data type
  • What a stack is
  • How to implement a stack using an array
  • How to implement a stack using a linked list
  • How to create a header file for use by other programs
  • How to implement a stack for a general data type
  • How to convert an expression from infix to postfix
  • How to evaluate an arithmetic expression
  • What a queue is
  • How to implement a queue using an array
  • How to implement a queue using a linked list

4.1 Abstract Data Types

We are familiar with the notion of declaring variables of a given type (double, say) and then performing operations ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required