April 8
Examples from April 8
Here are some Queue and Stack Examples:
Queue.java and NumberQueue.java This is a simple example of a generic queue structure and an application that stores numbers in the queue.
Stack.java and NumberStack.java: This is a similar example that builds a generic stack structure and an application that stores numbers in the stack.
Canvas.java Square.java Grid.java Stack.java TwoD.java and FloodStack.java: This implements the floodfill algorithm. The TwoD and FloodStack classes are the only new things here.
Canvas.java Square.java Grid.java Queue.java TwoD.java and FloodQueue.java: This also implements the floodfill algorithm, only with a queue rather than a stack.