Copyright | Copyright (C) 2021 Yoo Chung |
---|---|

License | GPL-3.0-or-later |

Maintainer | dev@chungyc.org |

Safe Haskell | Safe-Inferred |

Language | GHC2021 |

Some solutions to Problems.P68 of Ninety-Nine Haskell Problems.

# Documentation

:: Eq a | |

=> [a] | In-order sequence |

-> [a] | Pre-order sequence |

-> Maybe (Tree a) | Binary tree with the given in-order and pre-order sequences |

Given the in-order and pre-order sequences of a binary tree, return the original binary tree.

The values in each node of the binary tree will be distinct, in which case the tree is determined unambiguously.