Explore how values are stored and how operations change them. Choose a structure, enter starting values, then Apply start. Leave the values blank for an empty structure. Predict before executing; use Back, Step, Run and the timeline to investigate. Executing from an earlier step replaces the later branch of the trace.
Basic and Advanced
Basic emphasises the visible ordering rules. Advanced shows physical addresses, free nodes, pointers, a circular queue and memory tables. Both views operate on the same model. For queues, front is the next read slot and rear the next write slot. Count distinguishes full from empty when the pointers coincide. An empty stack uses top = −1.
Six workspaces
Stacks are last in, first out. Queues are first in, first out and use a count-based circular buffer. Linked lists follow next pointers; insertion uses the lowest available address and deletion removes the first matching value. A binary search tree stores unique keys; deleting a node with two children uses its in-order successor. Traversals visit each reachable node once. Graphs can be directed or undirected, with neighbours considered in ascending label order. Hash tables store unique integer keys using modulo hashing and separate chaining.
Limits and edge cases
Slots and node pools have capacity 3–9. Chained hash tables have 3–9 buckets and may hold up to 18 keys; load factor can exceed 1. Keys range from −99 to 999. Graphs have no parallel edges or self-loops. Negative hash keys use ((key MOD size) + size) MOD size. Rejected operations preserve the state. These are bounded teaching models; balanced trees, weighted graphs, shortest paths and open-addressed hashing are outside this version.
Challenges and saving
All 24 challenges are independent. Predict first, trace the earlier operations, then answer the final question. The last operation is hidden until a correct answer or Reveal help. Help marks the completion as helped. Wrong predictions and answer checks count towards this attempt. Practice records keep the best independent completion where possible; reattempting cannot erase an existing achievement. Records stay on this browser and do not award course XP or appear on teacher dashboards.
Files saves a snapshot of the current displayed state, not the whole timeline. Import validates addresses, structure rules and pointers before loading. Invalid projects leave your work intact. Device storage is optional; downloads work independently. Focus Mode hides outer navigation; Escape exits. Mobile panels stack, and reduced-motion preferences disable decorative effects.
Teacher reference: challenge answers
1 · Last in, first out: What does the final POP return? 7
2 · Track the top: What is the top index after the final POP? 1
3 · No room at the top: Write the final stack, bottom → top, after both pushes. 1,2,3,4
4 · Nothing left to pop: What error does the final POP report? Enter underflow or overflow. underflow
5 · Wait your turn: What does the final DEQUEUE return? 5
6 · Around the bend: What is the rear index after the final ENQUEUE? Rear means next write slot. 1
7 · Same pointers, full queue: What error does this ENQUEUE report? Enter underflow or overflow. overflow
8 · Reuse a freed slot: What is the front index after the final DEQUEUE? 2
9 · Follow the links: Write the final values in linked-list order. 5,10,30
10 · Recycle an address: Which address is allocated to value 40? Enter the number without @. 1
11 · Move the head: What is the head address after DELETE 7? 1
12 · Search to NULL: Is 99 found? Enter yes or no. no
13 · Sorted by traversal: Write the in-order traversal output. 1,3,6,8,10
14 · Insert, then visit: After INSERT 4, write the pre-order traversal output. 8,3,1,6,4,10
15 · Delete two-child node: After DELETE 3, write the in-order traversal output. 1,4,6,7,8,10
16 · Children before parent: Write the post-order traversal output. 1,6,3,14,10,8
17 · Breadth before depth: Write the BFS output from 1. Neighbours are considered in ascending label order. 1,2,3,4,5
18 · Follow one route: Write the DFS output from 1, considering neighbours in ascending label order. 1,2,4,3,5
19 · Respect the arrows: Write the BFS output starting at 3. 3
20 · A disconnected network: After disconnecting 1–2, write the BFS output from 1. 1,3,5
21 · Same bucket, different key: Write bucket 3’s chain after INSERT 24, in stored order. 10,17,24
22 · A negative key: Which bucket receives −1 when the table size is 7? 6
23 · Keep colliding keys reachable: Write bucket 3’s chain after DELETE 17. 10,24
24 · One key, one entry: How many keys are stored after the attempted duplicate INSERT 10? 2
Curriculum
Foundation activities introduce the behaviour of the structures. Advanced adds their array/node implementation, pointer changes and traversals. These support OCR H446 §1.4.2 data structures. This is practice support, not complete specification coverage.