• 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 5 pages
Exam (elaborations)

Dsa Exam 1 Questions And Answers

Document preview thumbnail
Preview 2 out of 5 pages

DSA EXAM 1 QUESTIONS AND ANSWERS

Content preview

DSA EXAM 1 QUESTIONS AND
ANSWERS



Base case - Correct Answers -which can be solved without recursion

Making progress - Correct Answers -each recursive call makes progress towards the
base case

Design rule - Correct Answers -assume recursive calls work without tracing it all out

Compound interest rule - Correct Answers -don't duplicate work already performed in a
previous call

Generic Objects - Correct Answers -we want to write a class that can store some data,
but we may wish to use it with different types


Double Hashing - Correct Answers -a second hash function is applied

Rehashing - Correct Answers -build another table twice as large and use a new hash
function to move everything from the original table to the new table

separate chaining - Correct Answers -the more lists there are, the shorter the lists will
be

autoboxing - Correct Answers -automatically inserts a wrapper

If a method has a parameter which accepts collections of type Person, could you pass it
a collection of type Student? - Correct Answers -No, because collections are not
covariant.

type erasure - Correct Answers -Generic classes are seen by the compiler but are
converted to regular classes (called raw classes) during compilation.

Comparator - Correct Answers -allows the comparison rule to be separate from the
object

algorithm - Correct Answers -a set of steps to solve a problem

, O Big O - Correct Answers -Upper bound (possibly equal).

Θ Theta - Correct Answers -Growth rates are equal.

Ω Omega - Correct Answers -Lower bound (possibly equal).

o Little o - Correct Answers -Upper bound (not equal).

log N - Correct Answers -Logarithmic

log^2 N - Correct Answers -Log-squared

N - Correct Answers -Linear

N^2 - Correct Answers -Quadratic

N^3 - Correct Answers -Cubic

2^N - Correct Answers -Exponential

For-loops - Correct Answers -Number iterations (n) times the statements inside

Nested for-loops - Correct Answers -Statements inside times the product of loop sizes

Consecutive statements add - Correct Answers -the maximum one is the one that
counts

If-else statements - Correct Answers -test plus the larger of the two branches

"Divide and Conquer" strategy runtime - Correct Answers -O(NLogN)

If an algorithm (repeatedly) takes constant time to reduce the problem size by a fraction,
its runtime is... ? - Correct Answers -O(logN)

If an algorithm (repeatedly) takes constant time to reduce the problem size by a
constant, its runtime is... ? - Correct Answers -O(N)

Binary Search runtime - Correct Answers -O(log N)

Euclid's Algorithm - Correct Answers -Finds greatest common divisor (gcd) of two
values.

O(log N)

abstract data type - Correct Answers -set of objects with a set of operations

Document information

Uploaded on
March 26, 2026
Number of pages
5
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