Fill in the following table, using Big-O notation to give the worst and average-case times for each of the stack methods for a stack of size N.
OPERATION | WORST-CASE TIME | AVERAGE-CASE TIME |
constructor | ||
empty | ||
size | ||
push | ||
pop | ||
peek |
Get Answers For Free
Most questions answered within 1 hours.