func kthLargest(root *TreeNode, k int) int {
var nums []int
nums = getNums(&nums, root)
return nums[k-1]
}
func getNums(nums *[]int, root *TreeNode) []int {
if root.Right != nil {
getNums(nums, root.Right)
}
if root != nil {
*nums = append(*nums, root.Val)
}
if root.Left != nil{
getNums(nums, root.Left)
}
}