DSA BT/BST Coding Assistant

Pick a drill to practice for the coding part of the final. Each one generates a fresh binary tree or binary search tree question of that kind — try it yourself, then reveal the solution. Bring your own OpenRouter key: it goes only to openrouter.ai, and free models work without credits.

Iterative Binary Tree

Binary-tree problems solved iteratively — walk the tree with your own stack or queue instead of recursion.

  • Walk the tree with your own stack or queue
  • A fresh question every time you ask
  • Solution, complexity, and walkthrough on reveal

Recursive Binary Tree

The same binary-tree problems solved recursively — let the call stack do the walking.

  • Let the call stack do the walking
  • Base case, recursive case, and what each call returns
  • Solution, complexity, and walkthrough on reveal

Iterative Binary Search Tree

Ordered binary-search-tree problems solved iteratively, following one path down the tree in a loop.

  • Follow one path down the tree in a loop
  • Ordering rules you can lean on to skip half the tree
  • Solution, complexity, and walkthrough on reveal

Recursive Binary Search Tree

Ordered binary-search-tree problems solved recursively, one path down the tree.

  • Follow one path down the tree, one call per level
  • Ordering rules you can lean on to skip half the tree
  • Solution, complexity, and walkthrough on reveal