O(n)
O(log n)
O(n2)
O(n log n)
B. O(log n)
AVL tree
Red-black tree
Lemma tree
None of the above
Last in first out
First in last out
Last in last out
First in first out
internal change
inter-module change
side effect
side-module update
True, False
False, True
True, True
False, False
Array
Stack
Tree
queue
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
linear arrays
linked lists
both of above
none of above
Sorting
Merging
Inserting
Traversal
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.
Binary search
Insertion sort
Radix sort
Polynomial manipulation
3 additions and 2 deletions
2 deletions and 3 additions
3 deletions and 4 additions
3 deletions and 3 additions
Stacks
Dequeues
Queues
Binary search tree
Counting the maximum memory needed by the algorithm
Counting the minimum memory needed by the algorithm
Counting the average memory needed by the algorithm
Counting the maximum disk space needed by the algorithm
O(n)
O(log n)
O(n2)
O(n log n)
Stack
Queue
List
Link list
Arrays
Linked lists
Both of above
None of above
Best case
Null case
Worst case
Average case
11
12
13
14
List
Stacks
Trees
Strings
elementary items
atoms
scalars
all of above
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
Divide and conquer strategy
Backtracking approach
Heuristic search
Greedy approach
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
Stacks linked list
Queue linked list
Both of them
Neither of them
sorted linked list
sorted binary trees
sorted linear array
pointer array
Tree
Graph
Priority
Dequeue
underflow
overflow
housefull
saturated
Processor and memory
Complexity and capacity
Time and space
Data and space
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
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