AS LEVEL COMPUTER SCIENCE
Exercise 1 - Linear search
Name: ______________________________
Date: __________________
Numbers: [17, 5, 23, 9, 12, 31, 8, 14]
The array Numbers uses indices from 1 to 8.
Write pseudocode to input an integer and use linear search to find it.
Output its index if found, or "Not found" otherwise.
Stop searching as soon as the integer is found.
Your pseudocode
Pseudocode practice
1/2
AS LEVEL COMPUTER SCIENCE
Exercise 2 - Bubble sort
Name: ______________________________
Date: __________________
Numbers: [29, 10, 14, 37, 8, 21]
The array Numbers uses indices from 1 to 6.
Write pseudocode to sort the array into ascending order using bubble sort.
Output the sorted array.
Your algorithm should stop when a complete pass makes no swaps.
Your pseudocode
Pseudocode practice
2/2