Skip to content
Advertisement

Tag: binary-tree

Method to delete certain level of binary tree

I have class SimpleTree just basic binary tree: And the problem is to write method: Where level is the level of the elements in some tree (root level == 0). For example level == 1: Only LEFT leaf of DELETED elements is saved, if we dont have such -> save the right. Answer Your tree seems to be a recursive

Serialize and Deserialize Binary Tree

I am working on the LeetCode problem 297. Serialize and Deserialize Binary Tree: 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

Advertisement