The goal for this exercise is to continue to review the Big “Oh” notation
Take the queue of integers, and the stack of integers that you've implemented, and annotate each method listed below, put a comment immediately before the start of each method describing the running time of that method, using the Big "Oh" notation Make sure to include a quick (1-2 sentence) explanation as to why you chose the running time that you did. You should do this exercise, based on your code, even if you can't get all the methods to work correctly.
What you need to do for this exercise:
Stack
class, you should have a note beside
the isEmpty
, Peek
, Push
and Pop
methods.Queue
class, you should have a note
beside the isEmpty
, Peek
, Enqueue
and Dequeue
methods