1/19
Looks like no tags are added yet.
What is an abstract data type?
Logical description of a data structure that specifies its operations but not how its implemented
What is the mnemonic for a stack?
LIFO (Last in, First out)
What does push(item) do for stacks?
Adds item tk the top of the stack
What does pop() do for stacks?
Removes item from the top of stack
What does peek() or Top() do for stacks?
Looks at top item without removing
What does Is Empty() do for stacks?
Checks if the stack is empty
What does Is Full() do for stacks?
Checks if the stack is full
What is overflow?
Pushing an item onto a stack thats full
What is underflow?
Popping a stacj thats already empty
What is the mnemonic for queues?
FIFO (First in, First out)
What does enqueue(item) do for queues?
Adds an item to the rear if the queue
What does dequeue() do for queues?
Removes and returns the items at the front
What is an array based linked stack?
Stores in array using indexes. Starts with 0 then 1 then 2 etc
What is a linked stack?
Uses a linked list instead of a fixed array
What is an example of a dynamic data structure?
Tree,graph,list
What is an example of a static data structure?
Array
What is a graph?
A data structure that can be used to represent complex non linear relationships
Explain how Breadth-First Search works
Visits all neighbouring nodes before moving to the next level. It uses a queue (FIFO)
Explain how Depth-First Traversal works
Follows one paths as far as possible before backtracking. Uses a stack (LIFO) and it explores the graph deep into the branch. There are many possibilities for the path.
What is a binary search tree?
Each node can have a max of 2 children. The smaller values go left, the larger values go right. There doesnt have to be two children, can be one.