sorted linked list
sorted binary trees
sorted linear array
pointer array
A. sorted linked list
Arrays
Records
Pointers
None
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
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.
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
Data
Operations
Both of the above
None of the above
O(n)
O(log n)
O(n2)
O(n log n)
Lists
Strings
Graph
Stacks
11
12
13
14
floor address
foundation address
first address
base address
True, False
False, True
True, True
False, False
Best case
Null case
Worst case
Average case
Last in first out
First in last out
Last in last out
First in first out
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
sorted linked list
sorted binary trees
sorted linear array
pointer array
Trees
Graphs
Arrays
None of above
Application level
Abstract level
Implementation 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
Traversal
Search
Sort
None of 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
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
array
lists
stacks
all of above
Array
Stack
Tree
queue
Graph
Binary tree
Trees
Stack
grounded header list
circular header list
linked list with header and trailer nodes
none of above
O(n)
O(log )
O(n2)
O(n log n)
Dynamic programming
Greedy method
Divide and conquer
Backtracking
internal change
inter-module change
side effect
side-module update
O(n)
O(log n)
O(n2)
O(n log n)
Sorting
Merging
Inserting
Traversal