Practice B2.2 Data structures with authentic IB Computer Science (First Exam 2027) exam questions for both SL and HL students. This question bank mirrors Paper 1, 2, 3 structure, covering key topics like programming concepts, algorithms, and data structures. Get instant solutions, detailed explanations, and build exam confidence with questions in the style of IB examiners.
Define what is meant by a "linked list" data structure.
Compare linked lists with arrays in terms of memory allocation and insertion/deletion operations.
Describe the components that would be required in each node of a simple linked list and explain how these components work together to form the list structure.
State what is meant by "abstract data types" (ADTs).
Explain the concept of encapsulation in relation to abstract data types and describe why it is beneficial.
List three operations that would typically be available for a Stack ADT and briefly describe what each operation does.
Define the term "record" (or "struct") in programming.
Explain how records differ from arrays and describe the advantages of using records for storing related data.
A library system needs to store book information including title, author, ISBN, and price. Justify why a record structure would be more appropriate than separate variables or arrays for this data.
Define what is meant by a "data structure" in programming.
Explain the difference between primitive data types and composite data structures, giving one example of each.
A programmer needs to store information about 100 students including their name, age, and grade. Justify why using a composite data structure would be more appropriate than using separate primitive variables.
Define what is meant by a "stack" data structure.
Explain the LIFO principle and describe two practical applications where stacks are commonly used in computing.
Describe the sequence of operations that would occur when using a stack to reverse the order of items in a list.
State two characteristics of a queue data structure.
Describe the FIFO principle and explain how it applies to queue operations. Provide a real-world analogy.
A restaurant uses a queue system for customer orders. Explain what happens to the queue when a new customer places an order and when the kitchen completes an order.
Define what is meant by a "two-dimensional array".
Explain how data is organized in a two-dimensional array and describe one practical application where it would be useful.
A spreadsheet contains sales data with 12 months as columns and 5 salespeople as rows. Describe how you would calculate the total sales for the third salesperson across all months.
State two characteristics of an array data structure.
Describe the advantages and disadvantages of using arrays for data storage.
A teacher wants to store test scores for 30 students in a single array. Explain the process of finding the highest score without using any built-in functions.
State what is meant by "searching" in the context of data structures.
Compare linear search and binary search algorithms in terms of their requirements and efficiency.
Explain why binary search cannot be used on an unsorted array and describe what preprocessing would be necessary to make binary search applicable.
State what is meant by "dynamic data structures".
Compare static arrays with dynamic data structures in terms of memory usage and flexibility.
A social media application needs to store an unknown number of user comments on a post. Explain why a dynamic data structure would be more suitable than a static array for this task.