Retranslate the complete Japanese online edition from Chinese (#2008)

* Retranslate the complete Japanese online edition from Chinese

* Fit Japanese homepage labels and localize heading permalinks

* Point Japanese contribution instructions to the Japanese preview

* Replace locale conditionals with multilingual UI tables
This commit is contained in:
Yudong Jin
2026-10-30 02:12:26 +08:00
committed by GitHub
parent 455e8c1281
commit 7257641e0e
1987 changed files with 23531 additions and 23261 deletions
@@ -7,10 +7,10 @@
const { arrToTree } = require('../modules/TreeNode');
const { printTree } = require('../modules/PrintUtil');
// 走査順序を格納するリストを初期化
// 走査順序を格納するリストを初期化する
const list = [];
/* 先行順走査 */
/* 行きがけ順走査 */
function preOrder(root) {
if (root === null) return;
// 訪問順序:根ノード -> 左部分木 -> 右部分木
@@ -19,42 +19,42 @@ function preOrder(root) {
preOrder(root.right);
}
/* 中順走査 */
/* 通りがけ順走査 */
function inOrder(root) {
if (root === null) return;
// 訪問優先順: 左部分木 -> 根ノード -> 右部分木
// 訪問順序:左部分木 -> 根ノード -> 右部分木
inOrder(root.left);
list.push(root.val);
inOrder(root.right);
}
/* 後順走査 */
/* 帰りがけ順走査 */
function postOrder(root) {
if (root === null) return;
// 訪問優先順: 左部分木 -> 右部分木 -> 根ノード
// 訪問順序:左部分木 -> 右部分木 -> 根ノード
postOrder(root.left);
postOrder(root.right);
list.push(root.val);
}
/* Driver Code */
/* 二分木を初期化 */
// ここでは、配列から直接二分木を生成する関数を利用する
/* 実行用コード */
/* 二分木を初期化する */
// ここでは配列から二分木を直接生成する関数を使う
const root = arrToTree([1, 2, 3, 4, 5, 6, 7]);
console.log('\n二分木を初期化\n');
console.log('\n二分木を初期化する\n');
printTree(root);
/* 先行順走査 */
/* 行きがけ順走査 */
list.length = 0;
preOrder(root);
console.log('\n先行順走査のノード出力シーケンス = ' + list);
console.log('\n行きがけ順走査で表示するノードの順序 = ' + list);
/* 中順走査 */
/* 通りがけ順走査 */
list.length = 0;
inOrder(root);
console.log('\n中間順走査のノード出力シーケンス = ' + list);
console.log('\n通りがけ順走査で表示するノードの順序 = ' + list);
/* 後順走査 */
/* 帰りがけ順走査 */
list.length = 0;
postOrder(root);
console.log('\n後行順走査のノード出力シーケンス = ' + list);
console.log('\n帰りがけ順走査で表示するノードの順序 = ' + list);