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
21. A binary tree whose every node has either zero or two children is called
- Complete binary tree
- Binary search tree
- Extended binary tree
- None of the above
22. The compledity of Binary tree is given by
- O (n)
- O (log)
- O(n log n)
- None of the above
23. When in order traversing a tree resulted E A C K F H D B G; the preorder traversal would return
- FAEKCDBHG
- FAEKCDHGB
- EAFKHDCBG
- FEAKDCHBG
24. When enting any algebraic expression E the following uses only binary operations in a 2-tree
- the variable in E will appear as external nodes and operations in internal nodes
- the operations in E will appear as external nodes and variables in internal nodes
- the variables and operations in E will appear only in internal nodes
- None of the above
25. When converting binary tree into extended binary tree, all the original nodes in binary tree are
- internal nodes on extended tree
- external nodes on extended tree
- vanished on extended tree
- None of the above
26. The post order traversal of a binary tree is DEBFCA. Find out the pre order traversal
- ABFCDE
- ADBFEC
- ABDECF
- None of the above
27. Which of the following data structure is linear data structure ?
- Trees
- Graphs
- Arrays
- None of the above
28. The operation of processing each element in the list is known as
- Merging
- Inserting
- Traversal
- All the above
29. Finding the location of the element with a given value is called
- Traversal
- Search
- Sort
- All of the above
30. Arrays are best data structures for
- relatively permanent collections of data
- the size of the structure and the data in the structure are constantly changing
- both of above situation
- none of above situation