Files
Yudong Jin 772183705e 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
2026-03-28 04:24:07 +08:00

41 lines
797 B
Go

// File: hanota_test.go
// Created Time: 2023-07-21
// Author: hongyun-robot (1836017030@qq.com)
package chapter_divide_and_conquer
import (
"container/list"
"fmt"
"testing"
. "github.com/krahets/hello-algo/pkg"
)
func TestHanota(t *testing.T) {
// Хвост списка соответствует вершине столбца
A := list.New()
for i := 5; i > 0; i-- {
A.PushBack(i)
}
B := list.New()
C := list.New()
fmt.Println("Исходное состояние:")
fmt.Print("A = ")
PrintList(A)
fmt.Print("B = ")
PrintList(B)
fmt.Print("C = ")
PrintList(C)
solveHanota(A, B, C)
fmt.Println("После завершения перемещения дисков:")
fmt.Print("A = ")
PrintList(A)
fmt.Print("B = ")
PrintList(B)
fmt.Print("C = ")
PrintList(C)
}