Algorithms

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

1/24

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

25 Terms

1
New cards

abstraction

ignoring unnecessary information and focusing on the main problem

2
New cards

decomposition

when you break a problem into smaller tasks to make it easier to solve

3
New cards

algorithm thinking

using both abstraction and decomposition to solve a problem

4
New cards

algorithm

set of instructions for solving a problem

5
New cards

binary search

find midpoint. compare to target. If not equal determine if > or < . discard the other half of the list. find new midpoints and repeat

6
New cards

what is the prerequisite for binary search

list must be ordered

7
New cards

linear search

compare first item in list with item you want to find. If item not found, keep going down the list.

8
New cards

does data need to be ordered in linear search

no

9
New cards

Bubble sort

compares each item with the next one and swaps them if out of order. When it goes through the data - that is a pass. Algorithm finishes when no more swaps are made

10
New cards

merge sort

divides list into half until each item is seperate. It merges sets and sorts them. Eventually ordered whole data set.

11
New cards

insertion sort

inserts the first item into sorted list. inserts another item. sorts the items

12
New cards

what is the first item in insertion sort called

the anchor

13
New cards
term image

start / end

14
New cards
term image

calculation / assignment

15
New cards
term image

input / output

16
New cards
term image

decision. For and while loops

17
New cards

what is the sign for finding the remainder of a division

%

18
New cards

what is the symbol for integer division

//

19
New cards

what do variables and constants both do ?

temporarily store data in a location in the memory

20
New cards

how is a variable different to a constant

users can change variables whilst the program is running

21
New cards

what can be used to display decomposition of a complex problem

structure diagrams

22
New cards

what are trace tables

tables used to track the value of variables as a program runs

23
New cards

name 2 searching algorithms

linear search , binary search

24
New cards

what is the midpoint in binary search if there’s an even

the truncated value of (lowest value + highest value)/2

25
New cards

advantages of merge sort compared to other sorting algorithms

faster for larger lists