Skip to content

Latest commit

 

History

History
12 lines (9 loc) · 422 Bytes

File metadata and controls

12 lines (9 loc) · 422 Bytes

World Tree

Problem Description

Given a binary tree where each node has a key value, rearrange the tree structure to achieve the minimum lexicographic sequence when traversing inorder.

Goal

Transform the tree and return the inorder traversal sequence.

Implementations

  • worldtree.sml - SML/NJ implementation
  • arrange.c - C implementation
  • Java/ - Java implementation with TreeNode and Arrange classes