CSCI 3333 final

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

1/27

encourage image

There's no tags or description

Looks like no tags are added yet.

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

No analytics yet

Send a link to your students to track their progress

28 Terms

1
New cards

(13 points) Basic Knowledge 1 What is the big-Oh run time of Merge Sort on n items?

O(n log n)

2
New cards

What is the big-Oh run time of Heap Sort on n items?

O(n log n)

3
New cards

What is the big-Omega lower bound for comparison based sorting of n items?

O(n log n)

4
New cards

What is the worst case big-Oh run time to insert 1 item into an AVL-tree that contains n items?

O(log n)

5
New cards

What is the worst case big-Oh run time to insert 1 item into a min-heap?

O(log n)

6
New cards

What is the worst case big-Oh run time to remove the minimum value from a min-heap?

O(log n)

7
New cards

What is the run time of breadth-first search (in terms of IVI and IEI)?

O(IVl+IEI)

8
New cards

What is the run time of Dijkstra's algorithm (in terms of I VI and IEI) assuming a min-heap based implementation?

O((IVI + IEI) log IVI)

9
New cards

What is the run time of Dijkstra's algorithm (in terms of IVI and IEI) assuming a Fibonacci-heap based implementation?

O(IVI log IVI + IEI)

10
New cards

What is the run time of the Bellman-Ford single-source shortest path algorithm (in terms of IVI and IEI)?

O(IVI • IEI)

11
New cards

What is the run time of the Floyd-Warshall "all-pairs" shortest path algorithm (The one that uses dynamic programming)?

O(IVl^3)

12
New cards

What is the run time of the Edmonds-Karp maximum flow algorithm?

O(IVI • IEl^2)

13
New cards

log(n) = O(n)

T

14
New cards

n = O(log n)

F

15
New cards

log^2 (n) = O(n)

T

16
New cards

n = O( log^2 n)

F

17
New cards

log(n) = Ω(n)

F

18
New cards

n = Ω(log n)

T

19
New cards

5n^3 + 7n + 13 = O(n^5)

T

20
New cards

5n^3 + 7n + 13 = Ω(n^5)

F

21
New cards

5n^3 + 7n + 13 = Ω(n)

T

22
New cards

log(n!) = Θ( nlog(n) )

T

23
New cards

n^(1/2) = O( log n)

F

24
New cards

2^n = Ω( n! )

F

25
New cards

bool hasPathSum(node* p int sum) {

if(p == nullptr) return false //Base Case  //leaf node: check if remaining sum equals this node’s value  If(p -> left == nullptr && p-> right == nullptr)   Return sum == p-> data;  Return hasPathSum(p-> left

26
New cards

Write a method ‘levelOrderTraversal

Void levelOrderTraversal(node * r){  

If(r == nullptr) return;  

Queue q;  qpush(r);  

while(!q.empty()){   

node* curr = q.front();

q.pop();   

cout << curr -> data << “ “;   

if(curr -> left) q.push(curr -> left);   

if(curr -> right) q.push(curr ->right);  } }

27
New cards

Int numEntries(node * p}

If(p == nullptr) return 0;  Int count = p->marked  If (p -> marked){   count = 1;  }  For (int i = 0; i < 256; i++){   if(p-children[i] != nullptr){    Count += numEntries(p->children[i]));   }  } Return count; }

28
New cards
What is the worst case big-Oh run time of binary search on an n item sorted list?
O(log n)