Java solution by post-order traversal (beats 54%)
Since most of the answers use pre-order and level-order traversal. Here is my post-order traversal solution as an inspiration. The idea is to get the bottom lef
Since most of the answers use pre-order and level-order traversal. Here is my post-order traversal solution as an inspiration. The idea is to get the bottom left value of each subtree at each root, compare their depths and pass onto its parent.\n\n```\nprivate class ResultSet {\n    final int depth;\n    final int val;\n\n    ResultSet(int depth, int val) {\n        this.depth = depth;\n        this.val = val;\n    }\n}\n\npublic int findBottomLeftValue(TreeNode root) {\n    return bottomLeft(root, 0).val;\n}\n\nprivate ResultSet bottomLeft(TreeNode root, int depth) {\n    if (root == null) return null;\n    if (root.left == null && root.right == null) return new ResultSet(depth, root.val);\n    else if (root.left == null) return bottomLeft(root.right, depth + 1);\n    else if (root.right == null) return bottomLeft(root.left, depth + 1);\n    else {\n        ResultSet left = bottomLeft(root.left, depth + 1);\n        ResultSet right = bottomLeft(root.right, depth + 1);\n        return right.depth > left.depth ? right : left;\n    }\n}\n```
[]