...

/

Challenge: Find kth Maximum Value in Binary Search Tree

Challenge: Find kth Maximum Value in Binary Search Tree

Try to solve the Find kth Maximum Value in Binary Search Tree problem.

We'll cover the following...

Statement

Given the root node of a binary search tree and an integer value k, return the kthk^{th} maximum value in the tree.

Constraints:

  • The number of nodes in the tree is n.

  • 11 \leq k \leq n 500\leq 500

  • 00 \leq Node.data 104\leq 10^4

Examples

Access this course and 1400+ top-rated courses and projects.