generated from cd155/blind-75-python-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
blind-75Blind 75 - Blind-75 problemsBlind 75 - Blind-75 problemstreeBlind 75 - Tree problemsBlind 75 - Tree problems
Description
LeetCode 297: Serialize and Deserialize Binary Tree
Category: Tree
Difficulty: See LeetCode
Solution File: src/tree/serialize_and_deserialize_binary_tree.py
Test File: tests/test_serialize_and_deserialize_binary_tree.py
Problem Description
Serialization is the process of converting a data structure or object into a sequence of bits
so that it can be stored in a file or memory buffer, or transmitted across a network connection
link to be reconstructed later in the same or another computer environment.
Design an algorithm to serialize and deserialize a binary tree.
Example 1:
Input: root = [1,2,3,null,null,4,5]
Output: [1,2,3,null,null,4,5]
Example 2:
Input: root = []
Output: []
Constraints:
- The number of nodes in the tree is in the range [0, 10^4].
- -1000 <= Node.val <= 1000
Tasks
- Implement the solution in
src/tree/serialize_and_deserialize_binary_tree.py - Ensure all test cases pass
- Analyze time complexity
- Analyze space complexity
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
blind-75Blind 75 - Blind-75 problemsBlind 75 - Blind-75 problemstreeBlind 75 - Tree problemsBlind 75 - Tree problems