Midterm Study CSC321

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

1/23

encourage image

There's no tags or description

Looks like no tags are added yet.

Last updated 5:06 AM on 5/5/26
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

24 Terms

1
New cards

Polynomial proofs

change all constants and add the constants

2
New cards

3n² + 5n = O(n²)

3n² + 5n ≤ 3n² + 5n² = 8n² → c=8, n₀=1

3
New cards

Exponent proof

split into 2 and multiply

4
New cards

2^(n+3) = O(2^n)

2³ · 2ⁿ = 8 · 2ⁿ = O(2^n)→ c=8, n₀=1

5
New cards
6
New cards

whats less than nlogn

n

7
New cards

whats greater than nlogn

8
New cards

T(n) = T(n/2) + O(1)

O(log n)

9
New cards

T(n) = T(n/2) + O(n)

O(n)

10
New cards

T(n) = 2T(n/2) + O(n)

O(n log n)

11
New cards

T(n) = 3T(n/2) + O(n)

O(n^1.585)

12
New cards

T(n) = 4T(n/2) + O(n)

O(n²)

13
New cards

T(n) = T(n-1) + O(n)

O(n²)

14
New cards

if small

solve directly

such as n>1 return…

15
New cards

else

divide into subproblems

16
New cards

recurse

combine solutions

17
New cards

MergeSort

split in half

sort each half recursively

merge (hard part)

18
New cards

Quicksort

pick pivot

partition array (hard part)

recurse each side

19
New cards

if complete

output/return for each extension

20
New cards

if feasible (extension)

solve extension

21
New cards

pruning

Stop exploring a partial solution early when it cannot lead to a complete solution.

22
New cards

Subset Sum pruning

sum > T OR sum + remaining < T

23
New cards

LIS (Longest Increasing Subsequence)

LISbigger(i, j):

skip vs take

return max

24
New cards

Text segmentation

Splittable(i):

empty string → return True.

try all j≥i where

IsWord(i,j) → Splittable(j+1)