Arrays
Records
Pointers
None
A. Arrays
3,4,5,2,1
3,4,5,1,2
5,4,3,1,2
1,5,2,3,4
Dynamic programming
Greedy method
Divide and conquer
Backtracking
tables arrays
matrix arrays
both of above
none of above
Best case
Null case
Worst case
Average case
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
O(n)
O(log n)
O(n2)
O(n log n)
Arrays
Records
Pointers
None
Stacks
Dequeues
Queues
Binary search tree
Arrays
Records
Pointers
None
Last in first out
First in last out
Last in last out
First in first out
Stacks linked list
Queue linked list
Both of them
Neither of them
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.
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
push, pop
insert, delete
pop, push
delete, insert
grounded header list
circular header list
linked list with header and trailer nodes
none of above
Sorting
Merging
Inserting
Traversal
Data
Operations
Both of the above
None of the above
FIFO lists
LIFO list
Piles
Push-down lists
True, False
False, True
True, True
False, False
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
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
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
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
Binary search
Insertion sort
Radix sort
Polynomial manipulation
Trees
Graphs
Arrays
None of above
O(n)
O(log n)
O(n2)
O(n log n)
array
lists
stacks
all of above
O(n)
O(log )
O(n2)
O(n log n)
Arrays
Records
Pointers
Stacks
Stack
Queue
List
Link list