Stacks
Dequeues
Queues
Binary search tree
C. Queues
16
12
6
10
Binary search
Insertion sort
Radix sort
Polynomial manipulation
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
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.
11
12
13
14
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
Dynamic programming
Greedy method
Divide and conquer
Backtracking
FIFO lists
LIFO list
Piles
Push-down lists
O(n)
O(log )
O(n2)
O(n log n)
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
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
Arrays
Linked lists
Both of above
None of above
Traversal
Search
Sort
None of above
Stack
Queue
List
Link list
Processor and memory
Complexity and capacity
Time and space
Data and space
array
lists
stacks
all of above
floor address
foundation address
first address
base address
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
tables arrays
matrix arrays
both of above
none of above
push, pop
insert, delete
pop, push
delete, insert
Stacks
Dequeues
Queues
Binary search tree
Lists
Strings
Graph
Stacks
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
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
Tree
Graph
Priority
Dequeue
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
Linked lists
Stacks
Queues
Deque
Stack
Input restricted dequeue
Priority queues
Output restricted qequeue
O(n)
O(log n)
O(n2)
O(n log n)