BY AuthorData Structure and Algorithm MCQs Test part 2BY adminSeptember 30 , 20200 Comments33 viewsFacebookTwitterGoogle plusTumblrPinterestEmailShareWelcome to your Data Structure and Algorithm MCQs Test part 21. A directed graph is ………………. if there is a path from each vertex to every other vertex in the digraph.A) Weakly connectedB) Strongly ConnectedC) Tightly ConnectedD) Linearly Connected2. In the …………….. traversal we process all of a vertex’s descendants before we move to an adjacent vertex.A) Depth FirstB) Breadth FirstC) With FirstD) Depth Limited3. State True of False.i) Network is a graph that has weights or costs associated with it.ii) An undirected graph which contains no cycles is called a forest.iii) A graph is said to be complete if there is no edge between every pair of vertices.A) True, False, TrueB) True, True, FalseC) True, True, TrueD) False, True, True4. Match the following.a) Completeness i) How long does it take to find a solutionb) Time Complexity ii) How much memory need to perform the search.c) Space Complexity iii) Is the strategy guaranteed to find the solution when there in one.A) a-iii, b-ii, c-iB) a-i, b-ii, c-iiiC) a-iii, b-i, c-iiD) a-i, b-iii, c-ii5. The number of comparisons done by sequential search is ………………A) (N/2)+1B) (N+1)/2C) (N-1)/2D) (N+2)/26. In ……………, search start at the beginning of the list and check every element in the list.A) Linear searchB) Binary searchC) Hash SearchD) Binary Tree search7. State True or False.i) Binary search is used for searching in a sorted array.ii) The time complexity of binary search is O(logn).A) True, FalseB) False, TrueC) False, FalseD) True, True8. Which of the following is not the internal sort?A) Insertion SortB) Bubble SortC) Merge SortD) Heap Sort9. State True or False.i) An undirected graph which contains no cycles is called forest.ii) A graph is said to be complete if there is an edge between every pair of vertices.A) True, TrueB) False, TrueC) False, FalseD) True, False10. A graph is said to be ……………… if the vertices can be split into two sets V1 and V2 such there are no edges between two vertices of V1 or two vertices of V2.A) PartiteB) BipartiteC) RootedD) Bisects11. In a queue, the initial values of front pointer f rare pointer r should be …….. and ……….. respectively.A) 0 and 1B) 0 and -1C) -1 and 0D) 1 and 012. Time is Up!
Leave a reply
You must login or register to add a new comment .