cs paper 1

studied byStudied by 2 people
0.0(0)
learn
LearnA personalized and smart learning plan
exam
Practice TestTake a test on your terms and definitions
spaced repetition
Spaced RepetitionScientifically backed study method
heart puzzle
Matching GameHow quick can you match all your cards?
flashcards
FlashcardsStudy terms and definitions

1 / 20

flashcard set

Earn XP

Description and Tags

21 Terms

1

algorithm

a sequence of steps that can be followed to complete a task

New cards
2

computer program

an implementation of an algorithm

New cards
3

decomposition

breaking down a problem into a number of sub-problems

New cards
4

abstraction

the process of removing unnecessary detail from a problem

New cards
5

linear search algorithm

compares the search item against each item in the list one by one

New cards
6

advantages of linear search

simple, no sorting required, good for short lists

New cards
7

disadvantages of linear search

slow, inefficient for long lists

New cards
8

search algorithm

finding a value in a data structure

New cards
9

binary search algorithm

finds the position of the target value within a sorted array by checking the middle value and then discarding half the list each time

New cards
10

advantage of binary search

quick

New cards
11

disadvantages of binary search

list needs to be sorted before searching

New cards
12

Boolean logic

a data type with two values, true or false

New cards
13

sorting algorithm

to order an unordered list

New cards
14

bubble sort

compares each pair in a list and swaps them if they are in the wrong order, repeats until there are no more swaps to be made

New cards
15

advantage of bubble sort

very simple so easy to program

New cards
16

disadvantage of bubble sort

slow for long lists

New cards
17

maximum number of comparisons for bubble sort

n(n-1)/2 comparisons

New cards
18

merge sort

splits a list into sub lists and then merges them back together in order

New cards
19

recursive function

calls itself in its definition

New cards
20

advantage of merge sort

much faster than bubble sort

New cards
21

disadvantage of merge sort

more complex to understand and code because it is recursive

New cards

Explore top notes

note Note
studied byStudied by 66 people
150 days ago
5.0(1)
note Note
studied byStudied by 23 people
798 days ago
5.0(1)
note Note
studied byStudied by 46 people
686 days ago
5.0(1)
note Note
studied byStudied by 11 people
190 days ago
5.0(2)
note Note
studied byStudied by 87 people
869 days ago
5.0(2)
note Note
studied byStudied by 27 people
738 days ago
5.0(1)
note Note
studied byStudied by 9 people
874 days ago
5.0(1)
note Note
studied byStudied by 11435 people
664 days ago
4.6(53)

Explore top flashcards

flashcards Flashcard (78)
studied byStudied by 19 people
362 days ago
5.0(1)
flashcards Flashcard (22)
studied byStudied by 45 people
505 days ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 4 people
699 days ago
5.0(2)
flashcards Flashcard (34)
studied byStudied by 3 people
708 days ago
5.0(1)
flashcards Flashcard (53)
studied byStudied by 3 people
820 days ago
5.0(1)
flashcards Flashcard (28)
studied byStudied by 59 people
811 days ago
5.0(2)
flashcards Flashcard (25)
studied byStudied by 4 people
365 days ago
5.0(1)
flashcards Flashcard (223)
studied byStudied by 194 people
294 days ago
5.0(2)
robot