mirror of
https://github.com/krahets/hello-algo.git
synced 2026-10-31 12:45:16 +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:
@@ -21,7 +21,7 @@ function sumRecur(n) {
|
||||
return n + sumRecur(n - 1);
|
||||
}
|
||||
|
||||
/* 線形時間のループ */
|
||||
/* 線形オーダーのループ */
|
||||
function linearLoop(n) {
|
||||
let res = 0;
|
||||
for (let i = 0; i < n; i++) {
|
||||
@@ -30,7 +30,7 @@ function linearLoop(n) {
|
||||
return res;
|
||||
}
|
||||
|
||||
/* 二次時間のループ */
|
||||
/* 二次オーダーのループ */
|
||||
function quadraticLoop(n) {
|
||||
let res = 0;
|
||||
for (let i = 0; i < n; i++) {
|
||||
@@ -41,7 +41,7 @@ function quadraticLoop(n) {
|
||||
return res;
|
||||
}
|
||||
|
||||
/* 対数時間のループ */
|
||||
/* 対数オーダーのループ */
|
||||
function logarithmicLoop(n) {
|
||||
while (n > 1) {
|
||||
n = Math.floor(n / 2);
|
||||
@@ -59,5 +59,5 @@ if (
|
||||
logarithmicLoop(4) !== 1 ||
|
||||
logarithmicLoop(5) !== 1
|
||||
) {
|
||||
throw new Error('complexity exercise check failed');
|
||||
throw new Error('計算量の練習問題の検証に失敗しました');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user