Skip to main content

DFS In Order

Visits the left subtree, then the root, then the right subtree.

Interactive Visualization

Loading visualization…

Usage

src/sample/inorder.ts
import { inOrder, Node } from 'athro';

const root = new Node(3);
const result = inOrder(root);