Data Structure and Algorithms MCQs


11. Question
Which of the following data structure is linear type ?




Answer

12. Question
To represent hierarchical relationship between elements, which data structure
is suitable ?




Answer

13. Question
You are given an OR problem and a XOR problem to solve. Then, which one of the following statements is true ?




Answer

14. Question
The time complexities of some standard graph algorithms are given. Match each algorithm with its time complexity ? (n and m are no. of nodes and edges respectively)
a. Bellman Ford algorithm 1. O (m log n)
b. Kruskals algorithm 2. O (n3)
c. Floyd Warshall algorithm 3. O(mn)
d. Topological sorting 4. O(n + m)




Answer

15. Question
Let T(n) be the function defined by
T(n) = 1 and T(n) = 2T (n/2) + n,
which of the following is TRUE ?




Answer