1. Fundamentals of algorithms Flashcards

1
Q

Computational Thinking

A

Solving problems using a computer system.

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

Decomposition

A

Breaking down complex problems into smaller, more manageable parts.

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

Abstraction

A

Focusing on essential details while ignoring unnecessary information.

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

Algorithm

A

A set of step-by-step instructions designed to solve a specific problem.

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

Systematic Approach

A

Taking a logical approach and using algorithmic thinking to solve a problem.

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

Pseudocode

A

Text-based tool using short English statements to describe an algorithm.

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

Program Code

A

Specific to a programming language, unlike generic pseudocode.

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

Flowchart

A

Visual tool using shapes to represent different functions of an algorithm, showing input/output, processes, decisions, and control flow.

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

Algorithm Inputs

A

Data or information entered into a program before processing, sourced from various inputs like user interaction or sensors.

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

Algorithm Processes

A

Doing actions in the algorithm that transform inputs into desired outputs, executed by the CPU.

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

Algorithm Outputs

A

Result of processing in an algorithm, often the indicator of whether the algorithm functions as intended.

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

Trace Table

A

Tool used to trace through an algorithm or program, testing for logic errors and recording the state of the algorithm at each step.

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

Purpose of Trace Table

A

Discovering the algorithm’s purpose, showing output data and intermediary steps, and recording the state of the algorithm.

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

Trace Table with Algorithms

A

Trace tables can be used with flowcharts, pseudocode, or program code to analyze algorithms and programs.

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

Algorithm Efficiency

A

Measure of the time taken to complete an algorithm.

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

Linear Search

A

Sequentially checks each element in the list until the target value is found. A linear search starts with the first value in a dataset and checks every value one at a time until all values have been checked
A linear search can be performed even if the values are not in order.

17
Q

Binary Search

A

Divides the sorted list into halves, eliminating half of the remaining elements in each step until the target value is found. A binary search keeps halving a dataset by comparing the target value with the middle value, going left if smaller, right if bigger, until it finds the value or realises it’s not there
To perform a binary search the data must be in order! A binary search can be performed on datasets containing numbers or words. Searching for a word instead of a number is the same process, except comparisons are made based on position in the alphabet (alphabetically) instead of numerical size

18
Q

Algorithm Selection

A

Choosing the most appropriate algorithm based on factors like input size, data structure, and problem constraints.

19
Q

Searching algorithm

A

Searching algorithms are precise step-by-step instructions that a computer can follow to efficiently locate specific data in massive datasets.

20
Q

Linear Search advantages / disadvantages

A

Advantages:
Works on unsorted datasets. Faster (than binary) on very small datasets. Simple to understand and implement.
Disadvantages:
Slow for large datasets. Inefficient, starts at the beginning each time.

21
Q

Binary Search advantages / disadvantages

A

Advantages:
Fast for large datasets. Efficient for repeated searches.
Disadvantages:
Dataset must be in order. More complex to implement.

22
Q

Sorting Algorithm

A

Precise step-by-step instructions for efficiently sorting data in datasets.

23
Q

Merge Sort

A

Sorting algorithm using the ‘divide and conquer’ strategy to divide a dataset into smaller sub-datasets and merge them back together in the correct order. Merge sort divides the dataset into smaller parts, sorts each part separately, and then merges them back together to obtain the sorted dataset.

24
Q

Bubble Sort

A

Simple sorting algorithm that compares adjacent elements and swaps them if they are in the wrong order. Bubble sort checks values in pairs and swaps them if they are not in the correct order. Bubble sort continues until there are no more swaps needed, indicating the dataset is sorted.

25
Q

Merge Sort advantages / disadvantages

A

Advantages:
Suitable for large datasets
Performs well no matter how unorganized the data is
Disadvantages:
Uses a lot of memory
More complex to implement

26
Q

Bubble Sort advantages / disadvantages

A

Advantages:
Simple to understand and implement
Disadvantages:
Slow for large datasets
Inefficient, as it iterates through the data multiple times