Algorithms Flashcards

1
Q

What is an algorithm?

A

An ordered set of unambiguous, executable steps that defines a terminating process

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

How could an algorithm be designed and viewed?

A

An algorithm is often designed and viewed using pseudocode or flowcharts

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

What is the difference between a While and Until loop?

A

While loops continue as long as a condition is true. Until loops will stop when a condition is met. The condition is expressed differently, one for continuation and one for termination

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

What is required to use recursion?

A

If termination conditions are not well set out, its possible a program may have an infinite loop which can lead to massive resources usage or crashes

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

What is the maximum number of time an insertion sort will need to loop?

A

An insertion sort will need to run one less times than the list length

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

What requirements are there to use Binary Search?

A

Must have a sorted list

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

What kinds of iteration do other sorting algorithms use?

A

Bubble Sort can be looping or recursive. Bucket Sort is looping. Quicksort is recursive.

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

How are algorithms measured based upon efficiency?

A

Algorithms are expressed based on the maximum number of operations they will need to run. These may be plotted on a graph which visualises how it will scale with larger numbers

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

What is validation?

A

It’s a process of ensuring that the product meets the needs and expectations of stakeholders. It tests the usability, functionalities and reliability of the end product. It emphasises executing the code to test the usability and functionality of the end product. It targets the end product that is ready to be deployed

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

What is verification?

A

It’s a process of checking if a product is developed as per the specifications. It tests the requirements design of product. It does not require executing the code and it targets internal aspects like requirements

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