Algorithms

0.0(0)
studied byStudied by 0 people
0.0(0)
full-widthCall Kai
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
GameKnowt Play
Card Sorting

1/9

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced
Call with Kai

No study sessions yet.

10 Terms

1
New cards

what is an algorithm?

a list of step-by-step instructions that help solve a problem

2
New cards

what is a searching algorithm?

an algorithm used to locate specific items in a collection of data

3
New cards

how do you do linear search?

you identify a search term, then look at the first item in the list and compare it to the search term. If it is the same, you have found the search term, otherwise move onto the next item and do the same thing.

4
New cards

how do you do bubble sort?

you compare two items that are next to each other to see if they are in the wrong order (one on the left is greater than one on the right). You should keep going through the list of data until all the data is sorted into order.

5
New cards

how do you do insertion sort?

An insertion sort compares values in turn, starting with the second value in the list. If this value is greater than the value to the left of it, no changes are made. Otherwise this value is repeatedly moved left until it meets a value that is less than it. The sort process then starts again with the next value. This continues until the end of the list is reached.

6
New cards

how do you do quick sort?

First, choose the pivot, then rearrange the items in the list so that items less or equal to the pivot are on the left and items that are greater are on the right. Repeat until the list is sorted.

7
New cards

how do you do merge sort?

the algorithm starts by splitting a list of items into two halves.

You then split them in half again until each sublist has only one item.

You can then merge them by comparing the first list item at each merge and putting them in order.

Continue to compare the sublists until the data is in order

8
New cards

how do you do binary?

First, take the number of items in the list and add 1, then divide by 2 to find the middle number.

Then, if the item you are looking for is greater than the the midpoint, take all items on the right, if not take the items on the left.

do the same thing, and repeat until you find the search term

9
New cards
10
New cards

what are the different sorting algorithms?

  • insertion

  • merge

  • quick

  • bubble