Inspiration

Data structures are some of the most important ideas in computer science, yet we still teach them with flat diagrams and static slides. A stack is "last in, first out," but that's hard to feel when you're looking at boxes on a whiteboard. Graph traversal is even harder: BFS and DFS are easy to memorize and surprisingly hard to picture. We wanted to find out if standing inside a data structure could make it click. Push a block onto a stack with your own hands, and you remember how a stack behaves.

What it does

Our Meta Quest app turns core data structures into spaces you can walk through and manipulate:

  • Arrays: Memory cells laid out in a row. Grab an element, move it, and watch the indices update live.
  • Stacks: Push and pop physical blocks. The "top" pointer rises and falls with every action.
  • Graphs: Nodes float around you in 3D, connected by edges. Run BFS or DFS and watch the traversal spread through the space step by step.

Operations show their complexity as you use them. Push and pop on a stack are $$O(1)$$, while BFS or DFS on a graph $$G = (V, E)$$ runs in $$O(V + E)$$.

How we built it

  • Engine: Unity with C#, targeting Meta Quest 2/3 as a standalone headset app
  • Interaction: Unity's XR Interaction Toolkit with Quest controllers for grabbing, pushing, and pointing
  • Logic: Each structure is a real, working C# implementation. The visuals are driven by the actual state of the data structure, not pre-baked animations, so what you see is what the code is doing.
  • Algorithms: BFS and DFS run step by step through a coroutine-based queue. Each step highlights the current node, the edge being explored, and the contents of the queue or stack.
  • Graph layout: A force-directed algorithm where connected nodes attract each other and all nodes repel each other, extended to three dimensions.

Challenges we ran into

3D graph layout was our biggest challenge. Drawing a graph in 2D is a well-understood problem, but in VR the user is inside the graph. Nodes can overlap, edges cut across your field of view, and a layout that looks clean from one angle becomes a tangle from another.

  • Spreading nodes in 3D: A force-directed layout gave us a good starting point, but it needed tuning. Too little repulsion and nodes clumped together, too much and the graph exploded out of reach. We balanced the forces and added damping so the layout settles instead of drifting forever.
  • Edge clutter: We made edges thin and used highlighting so the edges tied to the node you're exploring stand out from the rest.
  • Comfort and readability: Nodes and labels had to sit at a comfortable distance and size, and labels turn to face the user so they're always readable.
  • Keeping visuals in sync with logic: Animating each BFS/DFS step without drifting from the underlying data meant treating every step as a queued event instead of firing animations directly from the algorithm.
  • Time: We scoped down to three structures so each one felt polished instead of building many shallow demos.

Accomplishments that we're proud of

  • A working, interactive VR demo of arrays, stacks, and graph traversal running on a standalone Quest headset
  • Visuals driven by real data structure state, so the app is accurate as well as engaging
  • A 3D graph layout that stays readable when you're standing in the middle of it

What we learned

  • Designing for VR is different from designing for a screen: scale, distance, and comfort matter as much as correctness.
  • Layout algorithms like force-directed drawing behave very differently in 3D than in 2D.
  • Separating the data structure logic from the visuals made it much easier to add new structures and debug problems.

What's next

  • More structures: queues, linked lists, and trees
  • More algorithms: Dijkstra's, sorting visualizations, and step-back/rewind
  • A guided mode with guided lessons and quizzes

Built With

Share this project:

Updates

Submission history