Algorithms Flashcards

1
Q

What is an algorithm?

A

An algorithm is an ordered set of unambigious, executable steps that defines a terminating process

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

Algorithm Representation

A

Requires well-defined primitives
A colleciton of primitives constitutes a programming language

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

Polya’s Problem Solving Steps

A
  1. Understand the problem
  2. Devise a plan for solving the problem (düzenlemek)
  3. Carry out the plan (apply)
  4. Evaluate the solution for accuracy and its potential as a tool for solving other problems
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Components of repetitive control

A

Initialize : Establish an initial state that will be modified toward the termination condition

Test : Compare the current state to the termination condition and terminate the repitition if equal

Modify :Change the state in such a way that it moves toward the termination condition

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

Pretest and posttest loop

A

while and do while

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

Recursion

A

++The execution of a procedure leads to another execution of the procedure
++Multiple activations of the procedure are formed, all but one of which are waiting for other activations to complete

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

Algorithm efficiency

A

-Measured as number of instructions executed
-Big theta notation : Used to represent efficiency classes
+Example : Insertion sort is in Θ(n^2)
-Best, worst, average case analysis

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

Graph of the worst-case analysis of the insertion sort algorithm

A

artarak artan

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

Graph of the worst-case analysis of the binary search algorithm

A

azalarak artan sağdan başlayan grafik

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