mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-12 11:50:58 +00:00
Add ru version (#1865)
* Add Russian docs site baseline * Add Russian localized codebase * Polish Russian code wording * Update ru code translation. * Update code translation and chapter covers. * Fix pythontutor extraction. * Add README and landing page. * placeholder of profiles * Use figures of English version * Remove chapter paperbook
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