DSA Ch 3 & 4

0.0(0)
Studied by 0 people
call kaiCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 11:30 AM on 10/8/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai
Chat

No analytics yet

Send a link to your students to track their progress

10 Terms

1
New cards

asymptotic efficiency

how an algorithms running time behaves “in the limit” (as n gets very large), while abstracting away low-order terms and constant factors

2
New cards

asymptotic efficiency notations

  • O (Big-O) - grows no faster than (<=) (upper bound for speed)

  • Ω (Big-Omega) - grows no slower than (>=) (lower bound for speed)

  • Θ (Big-Theta) - grows exactly as fast as (=)


3
New cards

highest order term

term that grows the largest as n → ∞

ex: f(n)=7n^3+100n^2−20n+6

highest order term = n³

4
New cards

O (Big-O)

this is un upper bound for a time complexity equation. represented by a multiplier, c, and the highest order term

5
New cards

Ω (Big-Omega)

this is un lower bound for a time complexity equation. represented by a multiplier, c, and the highest order term

6
New cards

Θ (Big-Theta)

this is un tight bound for a time complexity equation. when big 0 and omega are have the same highest order term, but different multipliers

if both O(n³) and Ω(n³), we can now say it's Θ(n³)

7
New cards

Recursion tree Method

The function has a recursive part and a non-recursive part. Recursive part represents the time complexity of the recursive lines in the function. The non-recursive part represents the time complexity of the non-recursive lines that are called each time the function recurses.

  1. draw each level as the function calls on itself and divides

  2. make a function to describe how many times the algorithm will recurse in terms of n

  3. find out the time complexity of the non-recursive part at each level (if data is shrinking, plug in data size to non-recursive part to find new time complexity of that line)

  4. Does the sum of the non-recursive part approach any multiple of n? That will be the time complexity. Otherwise it will = (function describing the times the algorithm will recuse)(n)


8
New cards

Master Method

for time complexity functions in the form of T(n)=aT(n/b)+f(n) where a>=1 and b>1.


9
New cards

Substitution Method

  1. Guess an big O for T(n)

  2. Prove that T(n)<=bigO when plugging in a value <n

    1. plug big O into the T(n) function, adjusting for the <n value, and simplify

    2. show that resulting function T(n)<=bigO


10
New cards

multiplying square matrices

T(n)=Θ(n³) by master method