static int count = 0;
public int KthSmallestElement(Node root, int k)
{
if(root == null)
return 0;
// Write your code here
KthSmallestElement(root.left,k);
count++;
if(count == k){
return root.data;
}
KthSmallestElement(root.right, k);
return -1;
}