FAEKCDBHG
FAEKCDHGB
EAFKHDCBG
FEAKDCHBG
B. FAEKCDHGB
List
Stacks
Trees
Strings
3,4,5,2,1
3,4,5,1,2
5,4,3,1,2
1,5,2,3,4
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
Best case
Null case
Worst case
Average case
linear arrays
linked lists
both of above
none of above
LOC(Array[5]=Base(Array)+w(5-lower bound), where w is the number of words per memory cell for the array
LOC(Array[5])=Base(Array[5])+(5-lower bound), where w is the number of words per memory cell for the array
LOC(Array[5])=Base(Array[4])+(5-Upper bound), where w is the number of words per memory cell for the array
None of above
Stack
Queue
List
Link list
Abstract level
Implementation level
Application level
All of the above
Stacks linked list
Queue linked list
Both of them
Neither of them
O(n)
O(log n)
O(n2)
O(n log n)
Arrays
Linked lists
Both of above
None of above
by this way computer can keep track only the address of the first element and the addresses of other elements can be calculated
the architecture of computer memory does not allow arrays to store other than serially
both of above
none of above
FIFO lists
LIFO list
Piles
Push-down lists
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
Last in first out
First in last out
Last in last out
First in first out
The item is somewhere in the middle of the array
The item is not in the array at all
The item is the last element in the array
The item is the last element in the array or is not there at all
floor address
foundation address
first address
base address
Stacks
Dequeues
Queues
Binary search tree
must use a sorted array
requirement of sorted array is expensive when a lot of insertion and deletions are needed
there must be a mechanism to access middle element directly
binary search algorithm is not efficient when the data elements are more than 1000.
Array
Stack
Tree
queue
Data
Operations
Both of the above
None of the above
mn
max(m,n)
min(m,n)
m+n-1
tables arrays
matrix arrays
both of above
none of above
Tree
Graph
Priority
Dequeue
Trees
Graphs
Arrays
None of above
Counting microseconds
Counting the number of key operations
Counting the number of statements
Counting the kilobytes of algorithm
True, False
False, True
True, True
False, False
AVL tree
Red-black tree
Lemma tree
None of the above
16
12
6
10
Operations
Algorithms
Storage Structures
None of above