Week 2 Flashcards

1
Q

Basic steps of algorithm?

A
  • Simplify problem
  • Build mathematically solving plan
  • Design an algorithm
  • Test correctness of the algorithm
  • Implement the algorithm to a programming language
  • Documentation
  • Analyze complexity of the algorithm
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Complexity?

A
–  Average case
•  Notationθ(...)read Theta 
–  Best case
•  NotationΩ(...)read Omega 
–  Worst case
•  NotationO(...)read Big-O
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Heap is?

A

Complete binary tree

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

complete binary tree?

A

heap

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

merge sort worst case Big-O?

A

O(n log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

worst case of selection sort?

A

O(n^2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

quick sort worst case?

A

O(n log n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

do you agree that quicksort is faster than mergesort?

A

YES

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Prim algorithm was invented by?

A

Robert C. Prim in 1957

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Dijkstra algorithm was invented by?

A

Edsger Dijkstra in 1959

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Kruskal algorithm was invented by?

A

Joseph Kruskal in 1956

How well did you know this?
1
Not at all
2
3
4
5
Perfectly