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
C. pointers store the next data element of a list
the name of array
the data type of array
the index set of the array
the first data from the set to be stored
3,4,5,2,1
3,4,5,1,2
5,4,3,1,2
1,5,2,3,4
Data
Operations
Both of the above
None of the 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.
O(n)
O(log n)
O(n2)
O(n log n)
AVL tree
Red-black tree
Lemma tree
None of the above
Best case
Null case
Worst case
Average case
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
push, pop
insert, delete
pop, push
delete, insert
Stacks
Dequeues
Queues
Binary search tree
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
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
Operations
Algorithms
Storage Structures
None of above
3 additions and 2 deletions
2 deletions and 3 additions
3 deletions and 4 additions
3 deletions and 3 additions
mn
max(m,n)
min(m,n)
m+n-1
Graphs
Binary tree
Stacks
Queues
Tree
Graph
Priority
Dequeue
elementary items
atoms
scalars
all of above
Arrays
Records
Pointers
None
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.
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
Processor and memory
Complexity and capacity
Time and space
Data and space
Stack
Queue
List
Link list
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
Application level
Abstract level
Implementation level
All of the above
Graph
Binary tree
Trees
Stack
O(n)
O(log n)
O(n2)
O(n log n)
tables arrays
matrix arrays
both of above
none of above
Arrays
Records
Pointers
None
Dynamic programming
Greedy method
Divide and conquer
Backtracking