Question Link : https://www.interviewbit.com/problems/count-permutations-of-bst/
Code : https://ide.codingblocks.com/s/575687
In the code, with the first ‘if’ condition the output is being correct but if I remove this condition and use the condition mentioned in the comment then I get a wrong answer. Why so? Except for (0,0) and (1,0) shouldn’t the output be 0 if either A==0 or B==0?