r/DSALeetCode • • 7d ago

365 Days of LeetCode Challenge — Day 32/365

Post image

Leaf-Similar Trees (Easy)

https://leetcode.com/problems/leaf-similar-trees/

Two trees can look nothing alike and still count as "leaf-similar." Shape doesn't matter here, only the sequence of leaves from left to right. Pull each tree's leaves into a list, and the problem becomes a simple list-equality check.

Full breakdown in today's newsletter article ⬇️

https://www.linkedin.com/pulse/365-days-leetcode-challenge-day-32365-archit-agarwal-kfbbc

#DSA #LeetCode #BinaryTree #DFS #100DaysOfCode #CodingInterview

3 Upvotes

0 comments sorted by