while searchIndex < _______(searchList)
What is the missing command to check how big the list is?
OCR GCSE CS - 2.1 ERL sorts and searches
Quiz
•
Computers
•
10th - 11th Grade
•
Hard
Dean Whittle
Used 22+ times
FREE Resource
9 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
while searchIndex < _______(searchList)
What is the missing command to check how big the list is?
input
len
div
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How does a bubble sort ensure no data is lost when swapping values?
Adds it to a list
Converts it to an integer
Uses a temporary variable
Stores it in a tuple
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What algorithm does this represent?
searchIndex = 0
while searchIndex < len(searchList)
if searchList[searchIndex] == searchItem then
return true
endif
searchIndex = searchIndex + 1
endwhile
return false
Binary search
Linear search
Bubble sort
Insertion sort
4.
FILL IN THE BLANK QUESTION
1 min • 1 pt
Which search or sort finds the midpoint, checks if what they are looking for is higher or lower and discards the half not needed?
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
midPoint = (start + end) DIV 2
Which search or sort would this line of code belong to?
Binary search
Linear Search
Merge sort
Insertions sort
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
temp = sortList [sortCount]
sortList[sortCount] = sortList[sortCount + 1]
sortList[sortCount + 1] = temp
Which search or sort would this line of code belong to?
Binary search
Linear Search
Merge sort
Insertions sort
Bubble sort
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
temp = sortList [sortCount]
sortList[sortCount] = sortList[sortCount + 1]
sortList[sortCount + 1] = temp
Which does the above code do?
Puts the value into a temporary variable
Deletes the variable
Goes to the next value in the list
Creates a new list
8.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which line of code checks to see if an element in sortList is greater than the one to the left of it. It then repeats this working backwards through the list, until the element is in the correct place.
return sortList
for sortCount = 1 to len(sortList) - 1
temp = sortList [listIndex]
while listIndex > 0 and sortList[listIndex] < sortList[listIndex-1]
9.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which algorithm splits the arrays into sub-arrays of 1 element.
Binary search
Linear Search
Merge sort
Insertions sort
Bubble sort
9 questions
C++ Quiz 5: Searching and Sorting Algorithms
Quiz
•
7th - 12th Grade
6 questions
Создание массивов в Пайтон
Quiz
•
KG - Professional Dev...
12 questions
APCSA Unit 7
Quiz
•
9th - 12th Grade
10 questions
AppsLab_Q2
Quiz
•
10th Grade - Professi...
11 questions
GCSE Computer Science Paper 2: Topic 1
Quiz
•
10th Grade
10 questions
MS Excel VLookup
Quiz
•
9th - 12th Grade
10 questions
7.5 Standard Methods of Solution Cambridge IGCSE 0478
Quiz
•
10th Grade - University
10 questions
Search Algorithms
Quiz
•
9th - 12th Grade
15 questions
Character Analysis
Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
10 questions
American Flag
Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension
Quiz
•
5th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25
Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers
Quiz
•
6th - 8th Grade
17 questions
Chapter 12 - Doing the Right Thing
Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities
Quiz
•
9th - 12th Grade
20 questions
Types of Credit
Quiz
•
9th - 12th Grade
20 questions
Taxes
Quiz
•
9th - 12th Grade
17 questions
Parts of Speech
Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression
Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing
Quiz
•
9th - 12th Grade
10 questions
Identifying equations
Quiz
•
KG - University