From ae37e902a9b84df6500027076b3af3e2ffec313f Mon Sep 17 00:00:00 2001 From: Yudong Jin Date: Thu, 15 Dec 2022 22:38:18 +0800 Subject: [PATCH] Update space_complexity.md --- .../space_complexity.md | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/docs/chapter_computational_complexity/space_complexity.md b/docs/chapter_computational_complexity/space_complexity.md index de623e22e..6c876a3e6 100644 --- a/docs/chapter_computational_complexity/space_complexity.md +++ b/docs/chapter_computational_complexity/space_complexity.md @@ -196,7 +196,7 @@ comments: true === "Go" ```go title="" - func algorithm1(n int) { + func algorithm(n int) { a := 0 // O(1) b := make([]int, 10000) // O(1) var nums []int @@ -856,18 +856,6 @@ $$ === "Go" ```go title="space_complexity.go" - /* TreeNode 二叉树 */ - type TreeNode struct { - val int - left *TreeNode - right *TreeNode - } - - /* 创建 TreeNode 结构体 */ - func newTreeNode(val int) *TreeNode { - return &TreeNode{val: val} - } - /* 指数阶(建立满二叉树) */ func buildTree(n int) *TreeNode { if n == 0 {