Update lowest_common_ancestor.py

This commit is contained in:
bt3gl 2023-07-29 17:45:13 -07:00 committed by GitHub
parent da0f3fd5d8
commit c64f3318f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in
'''
class ThisTree:
def lowestCommonAncestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
def lowest_common_ancestor(self, root: 'TreeNode', p: 'TreeNode', q: 'TreeNode') -> 'TreeNode':
def dfs(root, p, q):