Basic 0f DSA MCQ
Q1.How many cases are there, which are used to compare various data structure's execution time in a relative manner?
- 2
- 3
- 4
- 5
Answer:- (B).
Explanations :There are three cases which are usually used to compare various data structure's execution time in a relative manner : Worst Case ,Average Case and Best Case.
Explanations :There are three cases which are usually used to compare various data structure's execution time in a relative manner : Worst Case ,Average Case and Best Case.
- Worst Case
- Average Case
- Best Case
- None of the above
Answer:- (A).
Explanations :This is the scenario where a particular data structure operation takes maximum time it can take.
Explanations :This is the scenario where a particular data structure operation takes maximum time it can take.
- ƒ(n)
- f(m)
- mf(n)
- nf(m)
Answer:- (c).
Explanations : If an operation takes ƒ(n) time in execution, then m operations will take mƒ(n) time.
Explanations : If an operation takes ƒ(n) time in execution, then m operations will take mƒ(n) time.
- Completeness
- Correctness
- Time Complexity
- Space Complexity
Answer:- (c).
Explanations :Time Complexity : Running time or the execution time of operations of data structure must be as small as possible.
Explanations :Time Complexity : Running time or the execution time of operations of data structure must be as small as possible.
- Group Items
- Attribute and Entity
- Elementary Items
- File items
Answer:- (c).
Explanations :Data items that cannot be divided are called as Elementary Items.
Explanations :Data items that cannot be divided are called as Elementary Items.
- A Posterior Analysis
- A Priori Analysis
- A Feasibility Analysis
- A Independent Analysis
Answer:- (A).
Explanations : This is an empirical analysis of an algorithm. The selected algorithm is implemented using programming language. This is then executed on target computer machine. In this analysis, actual statistics like running time and space required, are collected.
Explanations : This is an empirical analysis of an algorithm. The selected algorithm is implemented using programming language. This is then executed on target computer machine. In this analysis, actual statistics like running time and space required, are collected.
- Constant
- Quadratic
- Linear
- Cubic
Answer:- (A).
Explanations :O(1) means computing time is Constant.
Explanations :O(1) means computing time is Constant.
- Stacks
- Queues
- Deques
- Binary search tree
Answer:- (B).
Explanations : Queues data structure allows deleting data elements from front and inserting at rear.
Explanations : Queues data structure allows deleting data elements from front and inserting at rear.
- 2
- 3
- 4
- 6
Answer:- (B).
Explanations :In an array representation of binary tree the right child of root will be at location of 3.
Explanations :In an array representation of binary tree the right child of root will be at location of 3.
- Space complexity
- Time Complexity
- Quadratic Complexity
- Exponential Complexity
Answer:- (A).
Explanations :Space complexity of an algorithm represents the amount of memory space required by the algorithm in its life cycle.
Explanations :Space complexity of an algorithm represents the amount of memory space required by the algorithm in its life cycle.
Copyright © 2022 Shineskill Software Pvt. Ltd., All rights reserved.