Computer Science For First Examination In 2021 9618 · 9

Algorithm design and problem-solving

31 questions. Open a question to solve it and check the official answer.

2022 October-November · Paper 22 · Q4(b)

Algorithms · 1 mark · official answer ready

(b) Give the name of the iterative construct in the flowchart. ....................................................................................................................…

2022 October-November · Paper 22 · Q7(b)

Algorithms · 8 marks · official answer ready

(b) Write an efficient bubble sort algorithm in pseudocode for module SortArrays(). ...............................................................................................…

2022 October-November · Paper 33 · Q12(a)

Algorithms · 6 marks · official answer ready

12 (a) The array Names[0:99] is in alphabetical order. Complete this pseudocode binary search algorithm. Lower ←0 .................................................................…

2022 October-November · Paper 33 · Q12(b)(i)

Algorithms · 1 mark · official answer ready

(i) State the Big O notation for time complexity of a linear search. ..............................................................................................................…

2022 October-November · Paper 33 · Q12(b)(ii)

Algorithms · 2 marks · official answer ready

(ii) Describe the meaning of O(log n) as it applies to a binary search algorithm. .................................................................................................…

2021 October-November · Paper 21 · Q2(a)

Algorithms · 6 marks · official answer ready

2 (a) An algorithm to sort a 1D array into ascending order is described as follows: • move the largest value to the end • keep repeating until the array is sorted. Apply the proce…

2021 October-November · Paper 21 · Q2(b)

Algorithms · 6 marks · official answer ready

(b) The program flowchart shown describes a simple algorithm. START Set Count to 1 Set Flag to FALSE Is Flag = YES FALSE AND Count

2021 October-November · Paper 22 · Q6(b)

Algorithms · 2 marks · official answer ready

(b) Describe a feature of your solution to part (a) that indicates the pseudocode represents an efficient algorithm. ..............................................................…

2021 May-June · Paper 23 · Q5

Algorithms · 8 marks · official answer ready

5 A global 2D array Result of type INTEGER is used to store a list of exam candidate numbers together with their marks. The array contains 2000 elements, organised as 1000 rows an…

2021 May-June · Paper 42 · Q2(c)

Algorithms · 6 marks · official answer ready

(c) The following bubble sort pseudocode algorithm sorts the data in theArray into descending numerical order. There are five incomplete statements. PROCEDURE bubbleSort() DECLARE…

2021 May-June · Paper 43 · Q2(c)

Algorithms · 6 marks · official answer ready

(c) The following bubble sort pseudocode algorithm sorts the data in theArray into descending numerical order. There are five incomplete statements. PROCEDURE bubbleSort() DECLARE…