LESSON 2

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

1/33

flashcard set

Earn XP

Description and Tags

PRELIMINARIES OF ALGORITHM

Last updated 1:50 PM on 11/5/25
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No analytics yet

Send a link to your students to track their progress

34 Terms

1
New cards

step-by-step procedure, which defines a set of instructions to be executed

in a certain order

Algorithm

2
New cards

Algorithm to ____an item in a data structure.

Search

3
New cards

Algorithm to ____ items in a certain order.

Sort

4
New cards

Algorithm to _____ item in a data structure.

Insert

5
New cards

Algorithm to _______ an existing item in a data structure.

Update

6
New cards

Algorithm to _______ an existing item from a data structure.

Delete

7
New cards

Algorithm should be clear and ___________. Each of its steps (or

phases), and their inputs / outputs should be clear and must lead to only one meaning.

Unambiguous

8
New cards

An Algorithm should have 0 or more well-defined _______.

Input

9
New cards

An Algorithm should have 1 or more well-defined outputs, and should match

the desired

Output

10
New cards

Algorithms must terminate after a finite number of steps.

Finiteness

11
New cards

Should be feasible with the available resources.

Feasibility

12
New cards

An Algorithm should have step-by-step directions, which should be

independent of any programming code.

Independent

13
New cards

This is a theoretical analysis of an Algorithm. Efficiency of an

Algorithm is measured by assuming that all other factors,

Priori Analysis

14
New cards

This is an empirical analysis of an Algorithm. The selected

Algorithm is implemented using programming language.

Posteriori Analysis

15
New cards

_______ is measured by counting the number of key operations such as

comparisons in the sorting and searching Algorithm.

Time Factor

16
New cards

________ is measured by counting the maximum memory space required

by the Algorithm.

Space Factor

17
New cards

___________ of an Algorithm represents the amount of time required by the Algorithm to run to completion.

Time Complexity

18
New cards

_________ Complexity of an Algorithm represents the amount of memory space required

by the Algorithm in its life cycle.

Space Complexity

19
New cards

Asymptotic Analysis

Refers to defining the mathematical bound of run-time performance.

20
New cards

upper bound; measures Worst Case time complexity.

Big Oh (Ο

21
New cards

Lower bound; measures Best Case time complexity.

Omega (Ω)

22
New cards

Both lower and upper bounds.

Theta (θ)

23
New cards

Recursion

The process in which a function calls itself directly or indirectly.

24
New cards

Example of Recursion

  • TOH (Tower of Hanoi)

  • Tree Traversals (In-Order / Pre-Order / Post-Order)

  • DFS (Depth-First Search)

25
New cards

Informal combination of programming constructs and narrative text.

Pseudocode

26
New cards

Pictorial representation of a procedure using standard symbols.
“Blueprint” of a program.

Flowchart

27
New cards

Flowchart History —— WHO is introduced FLOWCART

Frank Gilbert (1921)

28
New cards

Shows logical steps within a program.

Program Flowchart

29
New cards

shows data procedures and connections.

System Flowchart

30
New cards

Produce ordered sequence of steps (Algorithm).

Problem Solving Phase

31
New cards

Implement the Algorithm in a programming language.

Implementation Phase

32
New cards
  • (Addition)
    – (Subtraction)

  • (Multiplication)
    / (Division)
    % (Modulus)

Arithmetic Operators

33
New cards

(Equal)

(Greater Than)
< (Less Than)
<> (Not Equal)
= (Greater Than or Equal To)
<= (Less Than or Equal To)

Relational Operators

34
New cards

&& (Logical AND)
|| (Logical OR)
! (Logical NOT)

Logical Operators