Same Tree (LeetCode 100) | Full solution with visuals and animations | Study Algorithms

Two trees even if they are different can result in a same traversal result. This happens because of the non-linear structure of the tree data structure. A neat little trick can be applied to the level order traversal technique to determine if two trees are exactly the same. Watch this video to understand how you can take advantage of the actual structure of a tree node and arrive at a solution. Actual Problem: https://leetcode.com/problems/same-tree/ Chapters: 00:00 - Intro 00:52 - Problem Statement and Description 02:58 - What exactly are same trees? 05:50 - A trick with level order traversal 09:02 - Dry-run of Code 12:57 - Final Thoughts 📚 Links to topics I talk about in the video: LeetCode Problems:    • Leetcode Solutions   Other easy problems:    • Easy Problems   Level Order Traversal:    • Level order traversal of Binary Tree | Ste...   Binary Tree:    • Binary Trees Introduction | Different type...   📘 A text based explanation is available at: https://studyalgorithms.com Code on Github: https://github.com/nikoo28/java-solut... Test-cases on Github: https://github.com/nikoo28/java-solut... 📖 Reference Books: Starting Learn to Code: https://amzn.to/36pU0JO Favorite book to understand algorithms: https://amzn.to/39w3YLS Favorite book for data structures: https://amzn.to/3oAVBTk Get started for interview preparation: https://amzn.to/39ysbkJ 🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalg... 🎥 My Recording Gear: Recording Light: https://amzn.to/3pAqh8O Microphone: https://amzn.to/2MCX7qU Recording Camera: https://amzn.to/3alg9Ky Tablet to sketch and draw: https://amzn.to/3pM6Bi4 Surface Pen: https://amzn.to/3pv6tTs Laptop to edit videos: https://amzn.to/2LYpMqn 💻 Get Social 💻 Follow on Facebook at:   / studyalgos   Follow on Twitter at:   / studyalgorithms   Follow on Tumblr at:   / studyalgos   Subscribe to RSS feeds: https://studyalgorithms.com/feed/ Join fan mail: http://eepurl.com/g9Dadv #leetcode #programming #interview

Invert Binary Tree (LeetCode 226) | Full solution with diagrams and animations | Study Algorithms
▶︎

Invert Binary Tree (LeetCode 226) | Full solution with diagrams and animations | Study Algorithms

Maximum Depth of Binary Tree (LeetCode 104) | Full Solution with animations | Study Algorithms
▶︎

Maximum Depth of Binary Tree (LeetCode 104) | Full Solution with animations | Study Algorithms

AI Class 38 · Decision Trees | Typical Monk
▶︎

AI Class 38 · Decision Trees | Typical Monk

L.85 Identical Tree (same tree) | Subtree of another Tree
▶︎

L.85 Identical Tree (same tree) | Subtree of another Tree

Symmetric Tree (LeetCode 101) | Full Iterative solution with animations diagrams | BFS
▶︎

Symmetric Tree (LeetCode 101) | Full Iterative solution with animations diagrams | BFS

Majority Element (LeetCode 169) | Full solution with 4 different methods | Interview Essential
▶︎

Majority Element (LeetCode 169) | Full solution with 4 different methods | Interview Essential

Penny Helps Sheldon Solve His Equation | The Big Bang Theory
▶︎

Penny Helps Sheldon Solve His Equation | The Big Bang Theory

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker
▶︎

Turing Award Winner: Disagreeing with Google, Postgres, Future Problems | Mike Stonebraker

1986: How to Spot the Upper Class | That's Life! | BBC Archive
▶︎

1986: How to Spot the Upper Class | That's Life! | BBC Archive

Why This Is the Most Exciting Time to Be Human | Ken Ono, Axiom Math
▶︎

Why This Is the Most Exciting Time to Be Human | Ken Ono, Axiom Math

How To Learn So Fast It’s Almost Unfair
▶︎

How To Learn So Fast It’s Almost Unfair

Palindrome Linked List (LeetCode 234) | Full solution with trick | Study Algorithms
▶︎

Palindrome Linked List (LeetCode 234) | Full solution with trick | Study Algorithms

MIT Professor: Leetcode, P vs NP, SAT Solvers | Ryan Williams
▶︎

MIT Professor: Leetcode, P vs NP, SAT Solvers | Ryan Williams

Jump Game (LeetCode 55) | Full solution with animations and visuals | Greedy Algorithms
▶︎

Jump Game (LeetCode 55) | Full solution with animations and visuals | Greedy Algorithms

Zig Zag Traversal (LeetCode 103) | Full Solution with visuals and a little trick | Study Algorithms
▶︎

Zig Zag Traversal (LeetCode 103) | Full Solution with visuals and a little trick | Study Algorithms

The Big Short (2015): The Jenga Scene – Explaining the Financial Collapse
▶︎

The Big Short (2015): The Jenga Scene – Explaining the Financial Collapse

China Is About To Pop The AI Bubble
▶︎

China Is About To Pop The AI Bubble

Level order traversal of Binary Tree | Step by step demo with example | Study Algorithms
▶︎

Level order traversal of Binary Tree | Step by step demo with example | Study Algorithms

What If Frying Pans Were Made Of Salt?
▶︎

What If Frying Pans Were Made Of Salt?

HackerRank - Reverse Linked List | Full solution with visuals | Study Algorithms
▶︎

HackerRank - Reverse Linked List | Full solution with visuals | Study Algorithms