Stacks and Queues

**Task 1**

Create a Stack class with the following methods:

is_empty()

push()

pop()

peek()

size()

Save this as a module

**Task 2**

Write a program which tests if a String containing parenthesis is balanced (the same number of open and closed parenthesis). Your solution should use your Stack class

**Task 3**

Adapt task 2 to use with parenthesis, square brackets and curly braces e.g. ‘{((([]))[[]])}’

**Task 4**

Use your Stack class to convert denary to binary.

**Task 5**

Adapt your code to use with other number bases

**Task 6**

Create a circular queue

**Task 7**

Create a priority queue

Previous LessonNext Lesson