Home
Explore
Exams
Search for anything
Login
Get started
Home
Engineering
Computer Science
cs paper 1
0.0
(0)
Rate it
Studied by 2 people
Learn
Practice Test
Spaced Repetition
Match
Flashcards
Card Sorting
1/20
Earn XP
Description and Tags
Computer Science
Add tags
Study Analytics
All
Learn
Practice Test
Matching
Spaced Repetition
Name
Mastery
Learn
Test
Matching
Spaced
No study sessions yet.
21 Terms
View all (21)
Star these 21
1
New cards
algorithm
a sequence of steps that can be followed to complete a task
2
New cards
computer program
an implementation of an algorithm
3
New cards
decomposition
breaking down a problem into a number of sub-problems
4
New cards
abstraction
the process of removing unnecessary detail from a problem
5
New cards
linear search algorithm
compares the search item against each item in the list one by one
6
New cards
advantages of linear search
simple, no sorting required, good for short lists
7
New cards
disadvantages of linear search
slow, inefficient for long lists
8
New cards
search algorithm
finding a value in a data structure
9
New cards
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
10
New cards
advantage of binary search
quick
11
New cards
disadvantages of binary search
list needs to be sorted before searching
12
New cards
Boolean logic
a data type with two values, true or false
13
New cards
sorting algorithm
to order an unordered list
14
New cards
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
15
New cards
advantage of bubble sort
very simple so easy to program
16
New cards
disadvantage of bubble sort
slow for long lists
17
New cards
maximum number of comparisons for bubble sort
n(n-1)/2 comparisons
18
New cards
merge sort
splits a list into sub lists and then merges them back together in order
19
New cards
recursive function
calls itself in its definition
20
New cards
advantage of merge sort
much faster than bubble sort
21
New cards
disadvantage of merge sort
more complex to understand and code because it is recursive