2.1 Algorithms Flashcards

only keywords (13 cards)

1
Q

Define Abstraction

A

Including only the necessary details and leaving out the unnecessary details when problem solving

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

Define Algorithmic thinking

A

A way of getting to a solution by identifying the steps needed

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

Define Decomposition

A

Breaking a problem down into smaller sub-problems, making the overall problem easier to solve

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

Define Algorithm

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

Define Flowchart

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
6
Q

Define Pseudocode

A

1) Language independent description of the steps of an algorithm.
2) Has no defined syntax, so it cannot be compiled or interpreted by the computer.

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

Define Binary search

A

1) 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.
2) Discarding the half of the data set that does not contain the record in each pass.
3) 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
8
Q

Define Bubble sort

A

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

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

Define 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
10
Q

Define Linear search

A

Examining each data item in turn until the item is found or the end of the data structure / file is reached

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

Define Merge sort

A

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

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

Define Syntax errors

A

Errors that break the grammatical rules of the programming language and prevent it from being run or translated

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

Define Logic errors

A

Errors that produce unexpected output/incorrect results but won’t stop the program from running

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