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:
Yudong Jin
2026-03-30 07:30:15 +08:00
committed by GitHub
parent fe6443235b
commit d7b2277d2b
1444 changed files with 83312 additions and 8363 deletions

View File

@@ -6,7 +6,7 @@
#include "../utils/common.hpp"
/* ドライバーコード */
/* Driver Code */
int main() {
/* 二分木を初期化 */
// ノードを初期化
@@ -15,7 +15,7 @@ int main() {
TreeNode *n3 = new TreeNode(3);
TreeNode *n4 = new TreeNode(4);
TreeNode *n5 = new TreeNode(5);
// ノードの参照(ポインタ)を構築
// ノードの参照(ポインタ)を構築する
n1->left = n2;
n1->right = n3;
n2->left = n4;
@@ -25,19 +25,19 @@ int main() {
/* ノードの挿入と削除 */
TreeNode *P = new TreeNode(0);
// n1 -> n2の間にードPを挿入
// n1 -> n2 の間にノード P を挿入
n1->left = P;
P->left = n2;
cout << endl << "ノード P を挿入後\n" << endl;
cout << endl << "ノード P を挿入した\n" << endl;
printTree(n1);
// ノードPを削除
// ノード P を削除
n1->left = n2;
delete P; // メモリを解放
cout << endl << "ノード P を削除後\n" << endl;
delete P; // メモリを解放する
cout << endl << "ノード P を削除した\n" << endl;
printTree(n1);
// メモリを解放
// メモリを解放する
freeMemoryTree(n1);
return 0;
}
}