Back to marketplace

1 Understanding Algorithms

No description yet. This curated deck is ready for daily study.

Total cards: 20•Content version: v4•Public deck•Updated: 8/1/2026

Card preview (20)

#1
Front (Question)

What is an algorithm?

Back (Answer)

• Step-by-step instructions in how to solve a problem/ how to carry out a task • A specific accurate solution to a problem • A detailed design for a solution

#2
Front (Question)

Characteristics of an algorithm

Back (Answer)

• A solution to a problem • Unambiguous • Sequence of steps • It can be used again • It will provide the same result as long as the input is the same Example: Making coffee * Pour 1 liter of coffee (Give clear, unambiguous instructions) * Heat the water and turn off when appropriate (Unclear, ambiguous)

#3
Front (Question)

What is a successful algorithm?

Back (Answer)

A successful algorithm fulfills these three points. * Accuracy - it leads to the expected outcome * Consistency - it produces the same result each time it is run * Efficiency - it solves problem in shortest possible time using fewest possible computer resources

#4
Front (Question)

Difference between algorithm and program

Back (Answer)

• Algorithm - a detailed design of a solution to a particular problem • Program - A way of implementing that design

#5
Front (Question)

Implementations of algorithms

Back (Answer)

• Written description • Pseudocode • Flowchart • Program code

#6
Front (Question)

What does a diamond shape represent in a flowchart?

Back (Answer)

*Selection * indicates a decision to be made * It produces True/False leading to two possible outcomes

#7
Front (Question)

What does a skew shape represent in a flowchart?

Back (Answer)

Input/output

#8
Front (Question)

What does an arrow shape represent in a flowchart?

Back (Answer)

• Logical flow of the algorithm • It shows what steps to be taken next

#9
Front (Question)

What does a rounded rectangle shape represent in a flowchart?

Back (Answer)

• Start/end • Terminal

#10
Front (Question)

What does a rectangle shape represent in a flowchart?

Back (Answer)

• Process • Indicates a process to be carried out

#11
Front (Question)

Flowchart

Back (Answer)

• A diagram of implementation of algorithm • Provides more visual display

#12
Front (Question)

Pseudocode

Back (Answer)

• A structed, code-like language that can be used to describe an algorithm • Is relatively straightforward to translate into any high-level programming language • helps to focus on the logic and efficiency of the algorithm (without having to bother about the rules of any particular programming language)

#13
Front (Question)

Variable

Back (Answer)

• A container that stores data(value) • The value in a variable is not fixed • Variable can store different values during the course of a program and each time a program is run

#14
Front (Question)

Constant

Back (Answer)

A container that holds a value that never changes * Pi value * Number of m in km

#15
Front (Question)

Identifier

Back (Answer)

• A unique name given to a variable or a constant • Using descriptive names can improve readability

#16
Front (Question)

Types of naming convention

Back (Answer)

• snake_case • camelCase/CamelCase

#17
Front (Question)

Variable and constant

Back (Answer)

• both hold/store a value • both have unique identifier • Value in variable is not fixed while value in constant is

#18
Front (Question)

Why is a variable useful?

Back (Answer)

• The value in variable can change as a program is running • Variables let the same program to process different sets of data

#19
Front (Question)

Operator

Back (Answer)

A character that represents an action

#20
Front (Question)

Arithmetic operators

Back (Answer)

7 types * Addition (+) * Subtraction (-) * Multiplication (*) * Real division(/) - includes decimal places * Quotient(DIV) - return whole number * Modulus(MOD) - return the remainder * Exponentiation(^) - power of