From f5549d8bea3cc89047accfc8eb1d302b6c2ccc5f Mon Sep 17 00:00:00 2001 From: Kartik Date: Wed, 21 Oct 2020 15:20:15 +0530 Subject: [PATCH 1/2] Fix space complexity in documentation. --- Tree/MaximumDepthOfBinaryTree.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tree/MaximumDepthOfBinaryTree.swift b/Tree/MaximumDepthOfBinaryTree.swift index c85f7134..20f48f1a 100644 --- a/Tree/MaximumDepthOfBinaryTree.swift +++ b/Tree/MaximumDepthOfBinaryTree.swift @@ -1,7 +1,7 @@ /** * Question Link: https://leetcode.com/problems/maximum-depth-of-binary-tree/ * Primary idea: recursion, return 0 when it is a leaf node - * Time Complexity: O(n), Space Complexity: O(1) + * Time Complexity: O(n), Space Complexity: O(n) * * Definition for a binary tree node. * public class TreeNode { @@ -24,4 +24,4 @@ class MaximumDepthOfBinaryTree { return max(maxDepth(root.left), maxDepth(root.right)) + 1 } -} \ No newline at end of file +} From 6f3cd83f97098e04b72fd007c078ab74e52a9971 Mon Sep 17 00:00:00 2001 From: Kartik Satoskar Date: Sat, 26 Jun 2021 16:00:38 +0530 Subject: [PATCH 2/2] Added Untitled Diagram.drawio --- Untitled Diagram.drawio | 1 + 1 file changed, 1 insertion(+) create mode 100644 Untitled Diagram.drawio diff --git a/Untitled Diagram.drawio b/Untitled Diagram.drawio new file mode 100644 index 00000000..8be4b732 --- /dev/null +++ b/Untitled Diagram.drawio @@ -0,0 +1 @@ +UzV2zq1wL0osyPDNT0nNUTV2VTV2LsrPL4GwciucU3NyVI0MMlNUjV1UjYwMgFjVyA2HrCFY1qAgsSg1rwSLBiADYTaQg2Y1AA== \ No newline at end of file