2.1 – Algorithms Flashcards

1
Q

What is abstraction?

A
  • Removing unnecessary details and including only the relevant ones
  • Focuses on what is important in problem solving
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is decomposition?

A
  • Breaking down a complex problem into small, more manageable parts
  • Makes problems easier to solve & different people can work on different parts of a problem at the same time
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is algorithmic thinking?

A
  • Getting to a solution by identifying the steps needed
  • Creates a set of rules you can follow to lead to an answer
  • Can allow a solution to be automated
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an algoritm?

A

A sequence of steps designed to perform a particular task

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

What is an input?

A

Data that is entered into or received by a computer

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

What is a process?

A

A program that is running in a computer

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

What is an output?

A

How to computer presents the result of a process

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

What is a flow diagram?

A

A method of designing algorithms before coding using symbols

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

What is a structure diagram?

A

A diagram that illustrates problem decomposition, produced using a method known as step-wise refinement

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

How do structure diagrams work?

A
  • Decompose the problem; some areas will need more breaking down than others
  • Lowest level nodes should achieve a single task which can then be coded as a single module or sub-program
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is Pseudocode?

A

An alternative, text-based way of representing the sequence of steps in an algorithm (simplified programming code)
Has no defined syntax so cannot be compiled or interpreted by the computer

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

What does Pseudocode do?

A

Lays down the logic of a program in an almost “real code” way without worrying about actual rules & syntax or an actual language

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

What is a Binary Search?

A

Accessing the middle record and determining whether the data item has been found
If not, checking whether it is before or after the current record in the data set
Discarding the half of the data set that does not contain the record in each pass
Repeating the algorithm until the data item is found or it is not in the data set
It only works if records in the file are in sequence

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

What is a Bubble Sort?

A

Repeatedly steps through a data set comparing each pair of adjacent items
Swaps pairs of items if they are in the wrong order
Stops when no swaps are made

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

What is an Insertion Sort?

A

Finds the correct location in a list for an item…
…By comparing it to the other items in the list in a linear way…
…Inserting the new item at the correct position…
…By moving all the other items after it by one index

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

What is a Linear Search?

A

Examining each data item in turn, starting from index number 0, until the item is found or the end of the data structure / file is reached

17
Q

What is a Merge Sort?

A

A divide and conquer algorithm
A list is repeatedly divided into smaller lists eventually containing just one item.
Each element is compared with the adjacent list…
…And merged back together from two lists into one