• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 8 pages
Exam (elaborations)

Dsa Midterm Exam Questions With Correct Answers

Document preview thumbnail
Preview 2 out of 8 pages

DSA MIDTERM EXAM QUESTIONS WITH CORRECT ANSWERS

Content preview

DSA MIDTERM EXAM QUESTIONS
WITH CORRECT ANSWERS



To define an ADT for your data structure, you should include implementation details on
how the data structure is implemented. - Correct Answers -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 Answers -False

The Linked implementation of the List ADT is more space efficient than the Array
implementation because of dynamic allocation. - Correct Answers -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 Answers -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 Answers -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 Answers -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 Answers -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 Answers -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 Answers -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 Answers -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 Answers -None of
the above, question is missing some information

What is the running-time growth rate of the Find_max algorithm when used to find the
item with the maximum Key in an unsorted list?
-Linear (n)
-Logarithmic (log n)
-Constant (1)
-None, missing info - Correct Answers -Linear (n)

The best case of the linear search algorithm is when we have only one item in the
collection - Correct Answers -False

The upper bound for an algorithm's growth rate is its cost in the worst case. - Correct
Answers -False

A lower bound to the running-time of an algorithm can be defined as any function that is
always equal to or less than the running-time of that algorithm - Correct Answers -True

Theta is the notation used to describe the amount of time required by the algorithm in
the average case. - Correct Answers -False

We use the Big-O, and Big-Omega notations to model the running time of an algorithm
in its worst, and best cases, respectively - Correct Answers -False

Document information

Uploaded on
March 26, 2026
Number of pages
8
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$12.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
millyphilip
3.7
(560)
Sold
2991
Followers
1963
Items
46798
Last sold
4 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions