Tap here to switch tabs
Problem
Submissions

Problem: Increasing Order Search Tree

Try to solve the Increasing Order Search Tree problem.

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

Try to solve the Increasing Order Search Tree problem.

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