Topic 5 Flashcards

1
Q

What is decomposition?

A

Breaking a complex problem, down into smaller problems and solving each one individually

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

What is abstraction?

A

Taking out the important bits of information from the problem, ignoring specific details that don’t matter

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

What is algorithmic thinking?

A

A logical way of getting from a problem to a solution. If the steps you take to solve follow an algorithm you it can be reused and adapt to solve similar problems in the future.

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

What does an oval mean in a flow chart

A

Start/end

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

What is a parallelogram box mean in a flowchart

A

Input/output

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

What does a box mean in a flowchart?

A

General, instructions, processes and calculations

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

What does a diamond box mean in a flowchart?

A

A decision

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

What is a box inside a box mean in a flowchart

A

Subprogram

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

What is the arrow show in a flowchart?

A

Arrows connect the boxes and show the direction you should follow

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

Conditions for a binary search

A

List must be ordered

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

Process of a binary search

A

Find the middle term in your ordered list
If this is your item then stop
If not compare with the item, you’re looking for, if the middle term comes before get rid of second half and vice versa
You’ll be left for the last half the size of the original list. Repeat steps one to 3 until you find the item.

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

What can a linear search be used on?

A

Unordered list

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

Process for linear search

A

Look at the first item in the unordered list
If this is your items in stop
Then look at the next item in the list
Repeat steps 2 to 3 until you’ve checked every item or found the one you’re looking for

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

Advantages of binary search

A

Faster
Takes fewer steps

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

Advantages of linear

A

Simple
Can be done on any type of list

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

Disadvantages of binary search

A

List must be ordered

17
Q

Disadvantages of linear

A

Slow
Takes a lot of steps

18
Q

What is bubble sort?

A

A sorting algorithm?

19
Q

Pros of bubble sort

A

Simple
Efficient have already in order
Don’t use much memory

20
Q

Cons of bubble sort

A

Inefficient way to sort a list
Doesn’t cope well with very large lists

21
Q

Process of bubble sort

A

Look at the first two items in the list
Move the correct order
Look at the next pair of items
Move to correct order
Repeat until end of list
Go back to the first pair and compare
Repeat process until list is in an order
One final pass to check

22
Q

Process of merge sort

A

Split the list in half
Keep missing list and half until each list only contains one item
Merge pairs of sublists each merge order the correct way
Repeat until you’ve merged all the sub lists together

23
Q

Pros of merge sort

A

More efficient and quicker
Very consistent running time

24
Q

Cons of Merge sort

A

It’s slower for small lists
Uses more memory

25
Q

Process for insertion sort

A

Look at second item in a list
Compare to all items before it, and insert the number into the right place
Repeat step two for all items in the list, until the last number has been inserted into the correct place

26
Q

Advantages for insertion sort

A

Very intuitive
Coped well with smallest
Doesn’t require very much additional memory
Very quick
Very quickly checking this is already sorted

27
Q

Disadvantages for insertion sort

A

Doesn’t cope well with very large lists