This is just for building tree..Please check code its not getting correct

hi
your code line 19 is wrong
u have write
if(!(s==true || s==false))

now if s==false then the statement is true and u have a ! symbol then it will not go in if statement

also if s==true then the statement is true and u have a ! symbol than it will not go in if statement

so u function will not go in if statement whatever the value of string

Yes it is intentionally done…because …if statement will be executed only when data in numbers is given but not true or false…
Anyway thanks…I resolved my issue

ok thats good
mark the doubt resolved ad gave feedback