class Codec: def serialize(self, root): return root def deserialize(self, data): return data
Codec object will be instantiated and called as such:
codec = Codec() codec.deserialize(codec.serialize(root))
I’m cheating. LOL😀
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.