January 08, 2025 |9.6K Views

    K’th Largest Element in BST when modification to BST is not allowed

      Share  1 Like
    Description
    Discussion

    Given a Binary Search Tree (BST) and a positive integer k, find the k’th largest element in the Binary Search Tree. For example, in the following BST, if k = 3, then output should be 14, and if k = 5, then output should be 10. 

    K’th Largest Element in BST when modification to BST is not allowed : https://www.geeksforgeeks.org/kth-largest-element-in-bst-when-modification-to-bst-is-not-allowed/given a Binary Search Tree (BST) and a positive integer k, find the k’th largest element in the Binary Search Tree. 


    For example, in the following BST, if k = 3, then output should be 14, and if k = 5, then output should be 10.

    K’th Largest Element in BST when modification to BST is not allowed  : https://www.geeksforgeeks.org/kth-largest-element-in-bst-when-modification-to-bst-is-not-allowed/