mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-03 19:52:01 +08:00
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:
@@ -4,12 +4,12 @@
|
||||
* Author: IsChristina ([email protected])
|
||||
*/
|
||||
|
||||
/* 二分木ノード */
|
||||
/* 二分木のノード */
|
||||
class TreeNode {
|
||||
val; // ノード値
|
||||
val; // ノードの値
|
||||
left; // 左の子ノードへのポインタ
|
||||
right; // 右の子ノードへのポインタ
|
||||
height; // ノードの高さ
|
||||
height; //ノードの高さ
|
||||
constructor(val, left, right, height) {
|
||||
this.val = val === undefined ? 0 : val;
|
||||
this.left = left === undefined ? null : left;
|
||||
@@ -18,7 +18,7 @@ class TreeNode {
|
||||
}
|
||||
}
|
||||
|
||||
/* 配列をデシリアライズして二分木に変換する */
|
||||
/* 配列をデシリアライズして二分木にする */
|
||||
function arrToTree(arr, i = 0) {
|
||||
if (i < 0 || i >= arr.length || arr[i] === null) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user