FIFO lists
LIFO list
Piles
Push-down lists
A. FIFO lists
Arrays
Records
Pointers
None
Application level
Abstract level
Implementation level
All of the above
Arrays
Records
Pointers
Stacks
sorted linked list
sorted binary trees
sorted linear array
pointer array
Stacks
Dequeues
Queues
Binary search tree
Much more complicated to analyze than that of worst case
Much more simpler to analyze than that of worst case
Sometimes more complicated and some other times simpler than that of worst case
None or above
The list must be sorted
there should be the direct access to the middle element in any sublist
There must be mechanism to delete and/or insert elements in list
none of above
Arrays are dense lists and static data structure
data elements in linked list need not be stored in adjacent space in memory
pointers store the next data element of a list
linked lists are collection of the nodes that contain information part and next pointer
Processor and memory
Complexity and capacity
Time and space
Data and space
for relatively permanent collections of data
for the size of the structure and the data in the structure are constantly changing
for both of above situation
for none of above situation
List
Stacks
Trees
Strings
underflow
overflow
housefull
saturated
Array
Stack
Tree
queue
Trees
Graphs
Arrays
None of above
Counting microseconds
Counting the number of key operations
Counting the number of statements
Counting the kilobytes of algorithm
grounded header list
circular header list
linked list with header and trailer nodes
none of above
O(n)
O(log n)
O(n2)
O(n log n)
When Item is somewhere in the middle of the array
When Item is not in the array at all
When Item is the last element in the array
When Item is the last element in the array or is not there at all
internal change
inter-module change
side effect
side-module update
Best case
Null case
Worst case
Average case
for relatively permanent collections of data
for the size of the structure and the data in the structure are constantly changing
for both of above situation
for none of above situation
push, pop
insert, delete
pop, push
delete, insert
tables arrays
matrix arrays
both of above
none of above
3,4,5,2,1
3,4,5,1,2
5,4,3,1,2
1,5,2,3,4
Stack
Queue
List
Link list
Last in first out
First in last out
Last in last out
First in first out
O(n)
O(log n)
O(n2)
O(n log n)
An array is suitable for homogeneous data but the data items in a record may have different data type
In a record, there may not be a natural ordering in opposed to linear array.
A record form a hierarchical structure but a linear array does not
All of above
3 additions and 2 deletions
2 deletions and 3 additions
3 deletions and 4 additions
3 deletions and 3 additions
Data
Operations
Both of the above
None of the above