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
31. Linked lists are best suited for
- relatively permanent collections of data
- the size of the structure and the data in the structure are cosnstantly changing
- both of above situation
- none of above situation
32. Each array declaration need not give, implicitly or explicitly, the information about the
- name of array
- data type of array
- first data from the set to be stored
- index set of the array
33. The complexity of merge sort algorithm is
- O (n)
- O(log n)
- O(n log n)
- None of these
34. The indirect change of the values of a variabhle in one modue by another module is called
- internal change
- inter-module change
- side efect
- all the above
35. Two main measures for the efficiency of an algorithm are
- Time and space
- Processor and memory
- Complexity and capacity
- Data and space
36. The time factor when determining the efficiency of algrithm is measured by
- Counting the number of key operations
- Counting the number of statement
- Counting the kilobytes of algorithm
- None of the above
37. The space factor when determining the efficiency of algorithm is measured by
- Counting the maximum memory needed by the algorithm
- Counting the minimum memory needed by the algorithm
- Counting the average memory needed by the algorithm
- Counting the maximum disk space
38. All the above which of the following data structures are indexed structures
- linear arrays
- linked lists
- both of above
- none of above
39. Which of the following is not the required condition for binary search algorithm
- there must be mechanism to delete and / condition for binary search algorithm
- the list must be sorted
- there should be the direct access to the middle element in any sublist
- none of the above
40. Which of the following is not a limitation of binary search algorithm ?
- binary search algorithm is not efficient when the data elements are more than 1000
- must use a sorted array
- requirement of sorted array is expensive when a lot of insertion and deletions are needed
- there must be a mechanism to access middle element directly