Consider the following recursive method, where N is a positive integer
mystery(N)
if (N > 0) AND (N mod 2 = 0) then
mystery(N−2)
end if
output N
end mystery
the output produced by the method call mystery(4)
Practice IB Computer Science (CS) Topic 5.1 Abstract Data Structures with authentic exam-style questions for both SL and HL students. This question bank focuses on the exact syllabus content for 5.1 Abstract Data Structures and mirrors Paper 1, 2, 3 style where relevant.
Get instant solutions, detailed explanations, and build confidence with questions aligned to IB examiner expectations.
Consider the following recursive method, where N is a positive integer
mystery(N)
if (N > 0) AND (N mod 2 = 0) then
mystery(N−2)
end if
output N
end mystery
the output produced by the method call mystery(4)
Determinism and non-invertibility are key characteristics of hashing.
how these properties contribute to the functionality and security of blockchain technology.
(a) two characteristics of a digital signature.
(b) two stages in the proof-of-work process.
5.1 Abstract data structures (HL)
how the order in which items are inserted into a Binary Search Tree (BST) can impact the efficiency of its search operations.
(a) between random access memory (RAM) and read only memory (ROM).
(b) the function of an operating system in managing primary memory.
(c) the roles of the data bus and the address bus in the machine instruction cycle.
(d) how the data stored in the following byte will be represented in hexadecimal.
| 0 | 1 | 0 | 1 | 1 | 1 | 1 | 0 |
(e) how many different integer values could be represented using an 8-bit byte.
(f) why this byte could not be used to represent characters such as those used in Chinese.
(g) a truth table with two input variables. If the input variables are equal the value of the output variable should be True, otherwise it should be False.