Tap here to switch tabs
Problem
Submissions

Problem: Increasing Order Search Tree

In Increasing Order Search Tree, rearrange a binary search tree so the smallest node is the root and every node has no left child, forming a right-only chain in sorted order.

Statement

Given the root of a binary search tree, rearrange the tree in in order so that the leftmost node becomes the new root of the tree, and every node has no left child and exactly one right child.

Constraints:

  • The number of nodes in the given tree is in the range [1,100][1, 100].

  • 0≤0 \leq Node.val ≤1000\leq 1000

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Increasing Order Search Tree

In Increasing Order Search Tree, rearrange a binary search tree so the smallest node is the root and every node has no left child, forming a right-only chain in sorted order.

Statement

Given the root of a binary search tree, rearrange the tree in in order so that the leftmost node becomes the new root of the tree, and every node has no left child and exactly one right child.

Constraints:

  • The number of nodes in the given tree is in the range [1,100][1, 100].

  • 0≤0 \leq Node.val ≤1000\leq 1000