Problem in logic


#1

why do we have to write
if(root->right != NULL) {
int res = kthsmallestRes(root->right, k, current);
if(current == k)
return res;
}
this lines;
cause we already got c==k;
after that if we go to the next statement current==k will satisfy and
it will return res which is 3; its bit confusing.