Computational Thinking, Problem-Solving and Programming:: IB Computer Science
Computational Thinking, Problem-Solving and Programming:: IB Computer Science
Content developed by
Dartford Grammar School
Computer Science Department
HL Topics 1-7, D1-4
4.2.8 Deduce the efficiency of an algorithm in the context of its use 6: Resource
management
4.2.9 Determine the number of times a step in an algorithm will be performed for given
input data
7: Control
D: OOP
https://www.youtube.com/watch?v=CX2CYIJLwfg
Content developed by Dartford Grammar School Computer Science Department
Sequential search (Pseudocode)
NAMES = “Bob”,”Betty”,”Kim”,”Lucy”,”Dave”
https://www.youtube.com/watch?v=D5SrAga1pno
Content developed by Dartford Grammar School Computer Science Department
Binary search
LOW = 0
HIGH = 7
FOUND = -1
https://www.youtube.com/watch?v=8Kp-8OGwphY
Content developed by Dartford Grammar School Computer Science Department
Bubble sort
https://www.youtube.com/watch?v=f8hXR_Hvybo
Content developed by Dartford Grammar School Computer Science Department
Content developed by Dartford Grammar School Computer Science Department
Selection sort (Pseudocode)
A - an array containing the list of numbers
numItems - the number of numbers in the list
for i = 0 to numItems - 1
for j = i+1 to numItems
if A[i] > A[j]
// Swap the entries
Temp = A[i]
A[i] = A[j]
A[j] = Temp
end if
end loop
end loop