Algorithms Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is an Algorithm

A

A set of Instructions that solves a problem

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

What is Decompostion

A

The process Of breaking down a problem into smaller more manageable parts of problems

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

What is Abstraction

A

The Process of Removing/Ignoring unnecessary data of a problem

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

What is Pattern Recognition

A

When Decomposition is Executed This helps examine the smaller parts for similarities this makes the problem solving more efficient

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

What is meant by the Term Algorithmic thinking

A

A way of finding the solution of a problem through a clear definition of the steps needed

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

What can Algorithmic Thinking be used for

A

To create a fully automated process

To Remove the need of human intervention

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

What is a Linear Search

A

A linear search is a sequential search. It starts from the begging of the list moving through the the items one by one until the information needed/item needed is found. Or it ends without finding the desired item

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

Explain what is a Binary search

A

A binary search is and efficient algorithm that searches items in a sorted list. They work by splitting the list into to and if the item is from the upper half the 2nd half is discarded If the item is in the 1st half the 2nd half is discarded. This then repeated until the Item is found.

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

explain how a merge sort works

A

The list is divided into two. Then the two lists are continuously halved into sub lists to the point there is one item in each sub list. The individual lists are then merged

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

How to complete a bubble sort

A

The first number is looked at and compared to the next number

If the 1st number is bigger then you swap the numbers around if not you do not swap them round

Move the to the next number with the current number you may have or not swapped.

Repeat the 2nd step until the last number has been reached.

The 1st pass is completed

if the list is still not sorted repeat once it is fully sorted you can stop

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

Give an advantage of Merge sort and Disadvantage

A

A:More efficient than bubble and Insertion sort.

D:It is difficult to code

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

What is an insertion sort algorithm

A

An insertion examens items in a list and inserts them into the correct position in the list

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

What are the Disadvantages and Advantages of Linear Search

A

Advantages - List does not have to be sorted

Disadvantages - Inefficient can take a while

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

What are the advantages Disadvantages of a Binary search

A

Advantages: Very Efficient
Disadvantages - Requires List to be sorted

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

What are Advantages and Disadvantages of Bubble sort

A

Pro-Very easy to implement and execute/do

Cons - Inefficient for large lists

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

Give an advantage and Disadvantage of Insertion sort

A

Advantage - Easy and efficient for small lists

Disadvantage - Inefficient for larger lists

17
Q

Is insertion sort slower or quicker than bubble sort

A

Quicker