DSC-Banasthali-Vidyapith / Code-Crossroad

This project contains the carefully compiled Data Structures & Algorithm questions asked by the companies that visit Banasthali Vidyapith on-campus.
MIT License
55 stars 78 forks source link

Diameter of Binary Tree added #79

Open neha030 opened 3 years ago

neha030 commented 3 years ago

I have added the C++ code for Diameter of a Binary Tree Please review my code.

neha030 commented 3 years ago

Fixes #47

nimisha-yadav commented 3 years ago

Hey @neha030! As per the contribution guidelines, can you describe your algorithm in brief at the starting of your code? Also, your code uses O(n^2) complexity, can you optimize it?

neha030 commented 3 years ago

Hey @neha030! As per the contribution guidelines, can you describe your algorithm in brief at the starting of your code? Also, your code uses O(n^2) complexity, can you optimize it?

Ok I will add the Description of the algorithm and try to optimize it