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
B. for the size of the structure and the data in the structure are constantly changing
Traversal
Search
Sort
None of above
Graph
Binary tree
Trees
Stack
O(n)
O(log n)
O(n2)
O(n log n)
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
Breath first search cannot be used to find converted components of a graph.
Optimal binary search tree construction can be performed efficiently using dynamic programming.
Given the prefix and post fix walks over a binary tree.The binary tree cannot be uniquely constructe
Depth first search can be used to find connected components of a graph.
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
Binary search
Insertion sort
Radix sort
Polynomial manipulation
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
P contains the address of an element in DATA.
P points to the address of first element in DATA
P can store only memory addresses
P contain the DATA and the address of DATA
mn
max(m,n)
min(m,n)
m+n-1
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
Lists
Strings
Graph
Stacks
Arrays
Records
Pointers
None
16
12
6
10
underflow
overflow
housefull
saturated
Stack
Queue
List
Link list
Dynamic programming
Greedy method
Divide and conquer
Backtracking
FIFO lists
LIFO list
Piles
Push-down lists
Arrays
Records
Pointers
None
O(n)
O(log )
O(n2)
O(n log n)
Stacks linked list
Queue linked list
Both of them
Neither of them
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
Stacks
Dequeues
Queues
Binary search tree
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
Application level
Abstract level
Implementation level
All of the above
Best case
Null case
Worst case
Average case
Abstract level
Implementation level
Application level
All of the 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
internal change
inter-module change
side effect
side-module update