Computational thinking and problem-solving
5 questions. Open a question to solve it and check the official answer.
Algorithms · 5 marks · official answer ready
1 (a) Algorithms usually consist of three different types of activity. Complete the following table. Write each example statement in program code and state the programming languag…
Recursion · 5 marks · official answer ready
(b) The binary search algorithm can be written recursively. Write program code for a recursive function recursiveBinarySearch(). Programming language .............................…
Recursion · 5 marks · official answer ready
(b) The binary search algorithm can be written recursively. Write program code for a recursive function recursiveBinarySearch(). Programming language .............................…
Recursion · 8 marks · official answer ready
(b) A new command has been added to initialise the pointers of the binary tree to − 1 to indicate they are not in use. A leaf is a node of the binary tree which has no children. I…
Algorithms · 0 marks · official answer ready
1 (a) Simple algorithms usually consist of input, process and output. The statements in the following table are in a generic programming language. Complete the table by placing ti…
