Skip to content

Commit a9640a3

Browse files
refactor 297
1 parent 68f2d00 commit a9640a3

File tree

1 file changed

+0
-25
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+0
-25
lines changed

src/main/java/com/fishercoder/solutions/_297.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,6 @@
55
import java.util.LinkedList;
66
import java.util.Queue;
77

8-
/**
9-
* 297. Serialize and Deserialize Binary Tree
10-
*
11-
* Serialization is the process of converting a data structure or object into a sequence of bits
12-
* so that it can be stored in a file or memory buffer,
13-
* or transmitted across a network connection link to be reconstructed later in the same or another computer environment.
14-
* Design an algorithm to serialize and deserialize a binary tree.
15-
* There is no restriction on how your serialization/deserialization algorithm should work.
16-
* You just need to ensure that a binary tree can be serialized to a string and this string can
17-
* be deserialized to the original tree structure.
18-
19-
For example, you may serialize the following tree
20-
21-
1
22-
/ \
23-
2 3
24-
/ \
25-
4 5
26-
27-
as "[1,2,3,null,null,4,5]",
28-
just the same as how LeetCode OJ serializes a binary tree.
29-
You do not necessarily need to follow this format, so please be creative and come up with different approaches yourself.
30-
31-
Note: Do not use class member/global/static variables to store states. Your serialize and deserialize algorithms should be stateless.
32-
*/
338
public class _297 {
349

3510
public static class Solution1 {

0 commit comments

Comments
 (0)