Practice 5.1 Abstract data structures with authentic IB Computer Science (CS) 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.
Sketch a double linked list that holds the following sequence of names: Anne, Lana, Mary.
Define the term recursion.
Outline why a binary tree would be a good choice of data structure for maintaining an address book.
Identify one application of a queue.
Identify one characteristic of a queue.
The names of vegetables must be always held in alphabetical order in a list in the main memory. The application program should allow insertion and deletion of the names of vegetables from this list.
Compare the use of a dynamic linked list for holding these names of vegetables with a static one-dimensional array.
Sketch a single linked list holding these vegetables: potato, asparagus, lettuce, radish.
List the steps required to insert cabbage into the linked list.
Explain why deleting the first node in this list is different to deleting other nodes.
State the dynamic data structure suitable for maintaining this list of vegetables which will allow faster searching for a given vegetable name.
Sketch the data structure suggested in part containing the vegetable names sorted in alphabetical order. The vegetable names are input in the following order: potato, asparagus, lettuce, radish.
Define the term child in relation to a binary tree.
Explain the importance of the method isEmpty() when constructing an algorithm which performs operations on a stack data structure.
Describe the characteristics of a queue.