solutions.py
57 subscribers
206 photos
183 links
admin: @Xojarbu
Download Telegram
#Trees, #DFS
Title: 404. Sum of Left Leaves
URL:
leetcode
Level: Easy
!! in the image comments where DFS , it is BFS and BFS comment is DFS approach.
#Trees, #DFS
Title: 200. Number of Islands
URL:
leetcode
Level: Medium
#binary_tree #DFS
Title: Invert Tree
URL: binarysearch
Level: Medium
#binary_tree #DFS
Title: Univalue Tree
URL: binarysearch
Level: Medium
#binary_tree #DFS
Title: Leaves in Same Level
URL: binarysearch
Level: Medium
#graph #dfs

Title: Flood fill
URL: leetcode
Level: Easy
github
👍1
#tree #dfs

Title: Same Tree
URL: leetcode
Level: Easy
github

Time: O(N) -> O(q+p)
👍1
#tree #dfs

Title: Maximum Depth of Binary Tree
URL: leetcode
Level: Easy
👍2
#binary_tree #tree #dfs
Title: 637. Average of Levels in Binary Tree
URL: leetcode
Level: Easy
DFS aproach
👍1
Title: 102. Binary Tree Level Order Traversal
URL: leetcode
Level: Medium
#DFS
Title: 297. Serialize and Deserialize Binary Tree
URL: https://leetcode.com/problems/serialize-and-deserialize-binary-tree/
Level: Hard

Initially, it looked very difficult, as soon as I tried smth on my own and then watched solution from neetcode: https://neetcode.io/solutions/serialize-and-deserialize-binary-tree
Solution was very straightforward.

Ko'z qo'rqoq, qo'l botir.
#DFS #binary_tree