✅ One Line Solution
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\n# Code #1 - Right to Left BFS \n (seen <a href="
(Disclaimer: this is not an example to follow in a real project - it is written for fun and training mostly)\n\n# Code #1 - Right to Left BFS \n<!-- (seen [here](https://leetcode.com/problems/find-bottom-left-tree-value/solutions/98779/right-to-left-bfs-python-java/)) -->\nTime complexity: $$O(n)$$. Space complexity: $$O(n)$$.\n```\nclass Solution:\n    def findBottomLeftValue(self, r: Optional[TreeNode]) -> int:\n        return reduce(lambda _,n:q.extend(filter(None,(n.right,n.left))) or n.val,q:=[r],0)\n```\n\n# Code #2.1 - DFS\nTime complexity: $$O(n)$$. Space complexity: $$O(n)$$.\n```\nclass Solution:\n    def findBottomLeftValue(self, r: Optional[TreeNode]) -> int:\n        return (f:=lambda n,p:n and ((q:=max((0,3,n.val),f(n.left,2),f(n.right,1)))[0]+1,p,q[2]) or (0,0,0))(r,0)[2]\n```\n\n# Code #2.2 - Unwrapped\n```\nclass Solution:\n    def findBottomLeftValue(self, r: Optional[TreeNode]) -> int:\n        def f(n, p): # node, priority\n            if n:\n                q = max((0, 3, n.val), f(n.left, 2), f(n.right, 1))\n                # If heights of left and right subtrees are the same,\n                # priority is used to make left subtree preferable.\n                # If they are 0, take current node\n\n                return (q[0]+1, p, q[2]) # (height, priority, value)\n\n            return (0, 0, 0)\n\n        return f(r, 0)[2]\n```\n\n(Disclaimer 2: all code above is just a product of fantasy, it is not claimed to be pure impeccable oneliners - please, remind about drawbacks only if you know how to make it better. PEP 8 is violated intentionally)
['Tree', 'Depth-First Search', 'Breadth-First Search', 'Binary Tree', 'Python', 'Python3']