# contributed by Jean Privat
class TreeNode
- attr _left: nullable TreeNode
- attr _right: nullable TreeNode
- attr _item: Int
+ var left: nullable TreeNode
+ var right: nullable TreeNode
+ var item: Int
init(left: nullable TreeNode, right: nullable TreeNode, item: Int)
end
- meth item_check: Int
+ fun item_check: Int
do
if _left == null then
return _item
end
end
-meth bottom_up_tree(item: Int, depth: Int): TreeNode
+fun bottom_up_tree(item: Int, depth: Int): TreeNode
do
if depth > 0 then
var item_item = 2 * item