int lf = ((t.left==null) = (t.right==null)) ? 1:0;
it returns 1 if the statement in the bigger parenthesis is true, but in the middle, whats the point of assigning right value to lefT?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Normally you’d have an equal sign to assign. The return of the assigned is the same as the RHS of the expression.
You’d use an equal sign in a expression within an if to assign and check the result at the same time.
Right here all you have is a compiler error because
t.left==nullevaluates to(true/false)and you can’t assign to that.