Data Structure & Algorithms Questions and Answers
Data Structures and Algorithms (DSA) form the foundation of programming and are highly important in campus placement exams and coding interviews. This resource includes Data Structure & Algorithms Questions with Answers designed to help students prepare for real interview patterns from companies such as TCS, Wipro, Cognizant, Capgemini, Amazon, and Infosys. These questions include programming logic, complexity analysis, and practical coding-based MCQs aligned with competitive tests. Concepts covered include arrays, stacks, queues, trees, hashing, recursion, sorting, and searching algorithms. The content also integrates programming interview questions with explanations, helping learners understand both logic and implementation. Practicing these questions supports placement readiness and improves problem-solving skills needed for technical and HR interview rounds.
Data Structure & Algorithms
11. If every node u in G is adjacent to every other node v in G, A graph is said to be
- Isolated
- Complete
- Finite
- Strongly connected
12. A variable P is called pointer if
- 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
- P contains the address of an element in DATA.
13. The Worst case ocur in linear search algorithm when
- Item is not in the array at all
- Item is the last element in the array
- Item is the last element in the array or is not there at all
- None of above
14. The Average case occur in linear search algorithm
- When Item is somewhere in he middle of the array
- When Item is not in the array at all
- When Item is the last element in the array
- All the above
15. The complexity of the average case of an algorithm is
- Much more complicated to analyze than that of worst case
- Much more simpler to analyze than that of worst case
- Sometimes more complicated and some other times simpler than that of worst case
- None of above
16. The following data structure allows deleting data elemtnts from front and inserting at rear
- Stacks
- Queues
- Deques
- Binary search tree
17. This data structure allows deletions at both ends of the list but insertion at only one end.
- Input-restricted deque
- Output-restricted deque
- Priority queues
- None of the above
18. The follwing data structure is non-linear type
- Strings
- Lists
- Stacks
- None of the above
19. The following data structure is non-linear type
- Strings
- Lists
- Queues
- All of the above
20. To represent hierachical relationship between elements, the following data structure is not suitable
- Deque
- Priority
- Tree
- All of above