Skip to content

Instantly share code, notes, and snippets.

@lienista
Created October 18, 2018 22:07
Show Gist options
  • Save lienista/320e42409a4bd7e1680a572289f4e2f5 to your computer and use it in GitHub Desktop.
Save lienista/320e42409a4bd7e1680a572289f4e2f5 to your computer and use it in GitHub Desktop.
(Algorithms in Javascript) CTCI 4.9. BST Sequences: A BST was created by traversing through an array from left to right and inserting each element. Given a binary search tree with distinct elements, print all possible arrays that could have led to this tree.
// 4.9. BST Sequences: A BST was created by traversing through an array from left to right
// and inserting each element. Given a binary search tree with distinct elements, print all
// possible arrays that could have led to this tree.
import { BinaryTree } from "../helpers/tree.js";
const bstSequences = (root) => {
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment