Algorithms Flashcards

1
Q

What is Computational Thinking?

A

Computational Thinking is about the steps taken to find a solution to a complex problem. It involves Decomposition, Abstraction and Algorithmic Thinking.

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

What is Decomposition?

A

Decomposition is breaking down a complex problem down into smaller, more manageable and understandable problems and solving each one individually.

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

What is Abstraction?

A

Abstraction involves picking out the important bits of information from the problem and ignoring the specific details that don’t matter.

Abstraction helps in simplifying complex problems.

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

Define Algorithmic thinking.

A

Algorithmic Thinking is a logical way of getting from a problem to a solution. It involves defining a series of logical steps to solve a problem.

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

What is Pseudocode?

A

Pseudocode is a method of writing up a set of instructions for a computer program using plain English and can be easily followed by a coder. This is a good way of planning a program before coding.

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

What are benefits of Pseudocode?

A
  • it can be quickly and easily converted into an actual programming language (because it’s similar)
  • it is fairly easy to understand, even for non-programmers
  • changes to the design can be incorporated quite easily
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are disadvantages of Pseudocode?

A
  • It can be hard to see how a program flows
  • It can be time consuming to produce
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are Flowcharts?

A

Diagrams that represent algorithms. Flowcharts use different shaped boxes for
different commands.

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

What are benefits of Flowcharts?

A
  • It is easy to see how a program flows.
  • Flow diagrams follow an international standard - it’s easy for any flow diagram user to pick up a diagram and understand it.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are disadvantages of Flowcharts?

A
  • with a large program, the diagrams can become huge in size and unwieldy to follow

-any changes to the design may mean a lot of the diagram has to be redrawn

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

What is the symbol for a process in Flowcharts?

A

Rectangle

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

What is the symbol for a input/output in Flowcharts?

A

Parallelogram

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

What is the symbol for a decision in Flowcharts?

A

Diamond

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

What is the symbol for a sub-program in Flowcharts?

A

Rectangle with two lines

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

What is the symbol for a terminal in Flowcharts?

A

Oval

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

What are Structure Diagrams?

A

A visual tool used to break down a complex problem into smaller, more manageable sub-problems

17
Q

What are Trace Tables?

A

Trace tables are used to allow programmers to trace the value of variables as each line of code is executed.

18
Q

What are Searching Algorithms?

A

Computers follow a search algorithm (step-by-step instructions) to find items in a list

19
Q

What are the two types of Searching Algorithms?

A

Linear Search
Binary Search

20
Q

What is a Linear search?

A

A Linear Search can be used on an unordered list. This type of search checks each item in turn and stops when it finds the item or reaches the end of the list.

21
Q

What is a benefit of Linear Searches?

A

They will work on any data set, whether it is ordered or unordered.

22
Q

What is a disadvantage of Linear Searches?

A

They can be quite inefficient, takes a lot of time for longer lists.

23
Q

What is Binary Search?

A

A Binary Search looks for items in an ordered list. It constantly divides the list in half and searches the middle value until the required value is found. The list can contain letters, numbers or alphanumeric characters.

24
Q

What is a benefit of Binary Searches?

A

It is a much more efficient algorithm than a linear search.

25
What is a disadvantage of Binary Searches?
A binary search can only work if a list is ordered.
26
What are Sorting Algorithms?
Computers follow a sorting algorithm (step-by-step instructions) to sort items in a list.
27
What are the three types of Sorting Algorithms?
Bubble Sort Insertion Sort Merge Sort
28
What is a Bubble Sort?
The Bubble Sort algorithm compares pairs of items. It is very simple but can take a long time to sort large lists.
29
What is an Insertion Sort?
An Insertion Sort orders the items as it goes. The Insertion Sort is a simple algorithm and works very well with small lists. It is not very efficient for larger lists.
30
What is a Merge Sort?
A Merge Sort splits the list apart then merges if back together. This is a much more efficient than the bubble sort for large lists but is slower for smaller lists.