Fast diameter of binary tree


this code is giving compilation error …please explain me why?

hi @Gaurav_dev max() can have only 2 arguments so to take max of more than 2 values you need to nest the function like this max(max(op1,op2),op3); so change the return statement in line 64 and it will run fine.

Please mark the doubt as resolved in case of no further queries :slight_smile:

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.