100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
DSA Exam 1 Questions and Answers $12.99   Add to cart

Exam (elaborations)

DSA Exam 1 Questions and Answers

 17 views  0 purchase
  • Course
  • DSA
  • Institution
  • DSA

Exam of 5 pages for the course DSA at DSA (DSA Exam 1)

Preview 2 out of 5  pages

  • August 29, 2024
  • 5
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • DSA
  • DSA
avatar-seller
Dreamer252
DSA Exam 1

Base case - answer which can be solved without recursion

Making progress - answer each recursive call makes progress towards the base case

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

Compound interest rule - answer don’t duplicate work already performed in a previous
call

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

autoboxing - answer 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? - answer No, because collections are not covariant.

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

Comparator - answer allows the comparison rule to be separate from the object

algorithm - answer a set of steps to solve a problem

O Big O - answer Upper bound (possibly equal).

Θ Theta - answer Growth rates are equal.

Ω Omega - answer Lower bound (possibly equal).

o Little o - answer Upper bound (not equal).

log N - answer Logarithmic

log^2 N - answer Log-squared

N - answer Linear

N^2 - answer Quadratic

, N^3 - answerCubic

2^N - answerExponential

For-loops - answerNumber iterations (n) times the statements inside

Nested for-loops - answerStatements inside times the product of loop sizes

Consecutive statements add - answerthe maximum one is the one that counts

If-else statements - answertest plus the larger of the two branches

"Divide and Conquer" strategy runtime - answerO(NLogN)

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

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

Binary Search runtime - answerO(log N)

Euclid's Algorithm - answerFinds greatest common divisor (gcd) of two values.

O(log N)

abstract data type - answerset of objects with a set of operations

collection - answerstores objects of the same type

insert - answerenqueue

delete - answerdequeue

circular queue - answerIf the back index reaches the end of the array, it may wrap to the
beginning.

tree - answera collection of nodes

top node - answerroot node

root is connected to - answerzero or more subtrees

root of each subtree - answeris a child of its parent

Length of path - answernumber of edges on the path

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller Dreamer252. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

84866 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.99
  • (0)
  Add to cart