plz tellthe error it is giving ambiguity when using optimised diameter approach here is the link
it is giving error when using optimiseddiameter approach
CPP - Binary Tree - Diameter of the Tree Optimized Approach
hey @ayush1213, you used wrong object to return from function in line 266
it is working fine now
1 Like