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
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
Backtracking problems are almost always implemented using a depth-first search (DFS) strategy — but not all DFS is backtracking, and not all DFS problems require pruning or reversal (which backtracking does).