mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-14 08:06:06 +00:00
Re-translate the Japanese version (#1871)
* Retranslate Japanese docs with GPT-5.4 * Retranslate Japanese code with GPT-5.4
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// File: space_complexity_test.go
|
||||
// Created Time: 2022-12-15
|
||||
// Author: cathay (cathaycchen@gmail.com)
|
||||
|
||||
package chapter_computational_complexity
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
. "github.com/krahets/hello-algo/pkg"
|
||||
)
|
||||
|
||||
func TestSpaceComplexity(t *testing.T) {
|
||||
n := 5
|
||||
// 定数階
|
||||
spaceConstant(n)
|
||||
// 線形階
|
||||
spaceLinear(n)
|
||||
spaceLinearRecur(n)
|
||||
// 二乗階
|
||||
spaceQuadratic(n)
|
||||
spaceQuadraticRecur(n)
|
||||
// 指数オーダー
|
||||
root := buildTree(n)
|
||||
PrintTree(root)
|
||||
}
|
||||
Reference in New Issue
Block a user