Index

Module 06 · DSAClinic: search, trees, graphs and heaps

Clinic #10 - Diameter of Binary Tree

Pattern: Tree Recursion + Global Max · LC 543

Diameter of Binary Tree
Diameter of Binary Tree · Open board

Wahi tree jo Clinic #09 - Maximum Depth of Binary Tree mein dekha tha, par is baar sawaal alag hai: root se neeche kitna nahi, do sabse door dabbon ke beech kitna.

Before you start. Clinic #09 - Maximum Depth of Binary Tree mein ek kaam seekha tha: har node (tree ka ek dabba, jiske neeche zyada se zyada do bachche latak sakte hain) se poochho “tumhare neeche sabse lamba raasta kitna hai”, chhote jawabon ko jod ke bada jawab banao, upar bhejo - isi ko recursion kehte hain. Yahan wahi sawaal ek naye mod ke saath aata hai: sabse lamba raasta root se shuru ho, zaroori nahi.

Continue reading with a plan

The first three lessons of every track are free. This lesson is included with a plan, which unlocks every lesson, board, video, lab and paper for one price.

View plans →Already a member? Sign in

Review DSA →

Saved in this browser, and to your account when you sign in.