Easy Solution | Python3  ✔
Approach\nThe approach used here is a recursive depth-first search (DFS) algorithm to find the bottom-left value in a binary tree. The function recursively trav
# Approach\nThe approach used here is a recursive depth-first search (DFS) algorithm to find the bottom-left value in a binary tree. The function recursively traverses the tree, keeping track of the height at each node. It updates the `val` variable with the value of the leftmost node encountered at the maximum depth (`height`). \n\n# Code\n```\nclass Solution:\n    val = float(\'inf\')\n    height = 0\n    def findBottomLeftValue(self, root: Optional[TreeNode]) -> int:\n        def find_left_val(root: Optional[TreeNode],height: int):\n\n            if not root:\n                return None\n\n            left, right = find_left_val(root.left,height + 1), find_left_val(root.right, height + 1)\n                \n            if root and height > self.height and not (root.left or root.right):\n                self.height = height\n                self.val = root.val\n\n            return root\n        \n        find_left_val(root, self.height)\n\n        return self.val if self.height > 0 else root.val \n```
['Depth-First Search', 'Recursion', 'Binary Tree', 'Python3']