GCSE Computer Science - 3.1 Fundamentals of Algorithms

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/13

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

14 Terms

1
New cards

Define the term Algorithm

A process or set of rules to be followed in calculations or other problem-solving operations, especially by a computer.

2
New cards

Define the term decomposition with examples

Breaking down a complex problem into smaller parts, e.g. Merge Sort Algorithm.

3
New cards

Define the term abstraction with examples

Removing unnecessary details to focus on the main goal, e.g. Driving a Car - don't need to know how turning key starts car.

4
New cards

Flowchart Symbols
Start/End:
Input/Output:
If:
Process:

Flowchart Symbols
Start/End: Oval
Input/Output: Parallelogram
If: Diamond
Process: Rectangle

5
New cards

Boolean Operators (Operator+Symbol)
AND:
OR:
NOT:
XOR:

Boolean Operators (Operator+Symbol)
AND: A • B =D-
OR: A + B +)>-
NOT: Ā -|>•-
XOR: A⊕B +))>-

6
New cards

Define with an example:
Sequence:

Selection:

Iteration:

Define with an example:
Sequence: The order in which instructions occur and are processed, e.g. normal code
Selection: determines which path a program takes when it is running, e.g. if statements
Iteration: repeated execution of a section of code when a program is running, e.g. for loop

7
New cards

Python example of selection:

age = int(input("Age: "))
if age >= 17:
print("Can drive a car.")
else:
print("Can't drive a car.")

8
New cards

Python example of iteration:

num = int(input("Enter number: "))
for num in range(num,0):
print(num)

9
New cards

Binary Search

Find 7:
3 7 9 10 | 11 21 33 42
<--
3 7 | 9 10
<--
3 | 7
-->
7

10
New cards

Linear Search

Find 6:
14 33 12 6 7 19 20
-> -> -> |
\/
6

11
New cards

Binary Search vs. Linear Search

Binary Search | Linear Search
Has to be sorted | Can be unsorted
Faster on longer lists | (on Avg.) | Slower on longer lists
Similar average speeds on short lists

12
New cards

Merge Sort

knowt flashcard image
13
New cards

Bubble Sort

Starts at the beginning of the list and compares each number to the next one in the list. If it is bigger than the next number they switch.

<p>Starts at the beginning of the list and compares each number to the next one in the list. If it is bigger than the next number they switch.</p>
14
New cards

Merge Sort vs. Bubble Sort

Merge Sort | Bubble Sort
Faster on longer lists | Faster on shorter lists
Takes up more memory | Very slow on long lists