Week 9 Workshop 6 Linear Data Structures – Part 2 Applications

 0    11 cartonașe    up804653
descarcă mp3 printează joacă Testează-te
 
Întrebare English Răspuns English
What is a stack?
începe să înveți
A stack is a collection of objects where only the most recently inserted object can be removed at any time. A stack is a linear data structure. Last-In First-Out structure – LIFO.
what are the applications of a stack?
începe să înveți
Matching brackets in arithmetic expressions, Recursive algorithms, Evaluating arithmetic expressions.
what are the 5 methods supported by Stack ADTs
începe să înveți
Push, Pop, Peek, Empty, Full
What is push?
începe să înveți
add an item to the stack
what is pop?
începe să înveți
Remove an item from the top of the stack
what is peek
începe să înveți
Peek Examine item at the top of the stack,
what is empty
începe să înveți
Empty Determine if the stack is empty,
what is full?
începe să înveți
Full Determine if the stack is full.
what 3 situations will cause a stack to throw an error when a method is enacted?
începe să înveți
push operation is requested on a full stack, pop operation is requested on an empty stack.
what is a queue?
începe să înveți
A queue is a collection of objects organised such that the object that has been stored in the queue the longest is the next one removed. A queue is a linear data structure.
what operations does a queue suppoort?
începe să înveți
Enqueue, Dequeue, Full, Empty, First

Trebuie să te autentifici pentru a posta un comentariu.