DSA Midterm exams with correct answers 100% 2026
DSA Midterm exams with correct answers 100% 2026 To define an ADT for your data structure, you should include implementation details on how the data structure is implemented. - Correct Answer False. An ADT is just a specification (or contract) of what operations your data structure should support. Implementation details will be then included in the class defining the data structure. To implement a data structure, the data structure's class should be aware of the type of items stored. - Correct Answer False The Linked implementation of the List ADT is more space efficient than the Array implementation because of dynamic allocation. - Correct Answer False The Array implementation of the List ADT is more space efficient than the Linked implementation when: -The Linked List is at least half full -The Array is at least half full -The Array implementation is always better -None of the above - Correct Answer The Array is at least half full The Linked list with sentinel nodes is a better implementation than the normal one, because: -It has a better time efficiency for insertion and deletion -It reduces code complexity for insertion and deletion by removing special case checks -Both are true - Correct Answer It reduces code complexity for insertion and deletion by removing special case checks The space requirement for a SkipList is always 3np, where n is the number of inputs and p is the size of the pointer - Correct Answer False The worst-case running-time analysis of the search operation in SkipList occurs when: -All nodes are at the same level -The item we are searching for is located at the end of the list -Both are true - Correct Answer All nodes are at the same level The SkipList will be have a worse running-time for the search operation than both the Array and Linked implementations of the list ADT when all SkipList nodes are at the same level - Correct Answer False Having all the SkipList nodes at the same level defines the worst-case of the SkipList's search operation. However, the efficiency of SkipList in the worst-case is the same as it in Array and Linked implementations of the List ADT. SkipList will be at least as efficient. You can get 100% code coverage without writing meaningful tests to your code - Correct Answer True To have 100% mutation coverage, all mutants in your code should be killed (detected) by failing of at least one of your test cases - Correct Answer True What is the running-time growth rate of the linear (sequential) search algorithm used to search for a target item with Key K in an unsorted list? -Linear (n) -Logarithmic (log n) -Constant (1) -None of the above, question is missing some information - Correct Answer None of the above, question is missing some information
Document information
- Uploaded on
- March 26, 2026
- Number of pages
- 13
- Written in
- 2025/2026
- Type
- Exam (elaborations)
- Contains
- Questions & answers