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
@@ -8,44 +8,44 @@
/* 関数 */
int func() {
// 何らかの処理を行う
// 何らかの処理を実行する
return 0;
}
/* 定数階 */
/* 定数オーダー */
void constant(int n) {
// 定数、変数、オブジェクトは O(1) の空間を占める
// 定数、変数、オブジェクトは O(1) の領域を使用する
const int a = 0;
int b = 0;
vector<int> nums(10000);
ListNode node(0);
// ループ内の変数は O(1) の空間を占める
// ループ内の変数は O(1) の領域を使用する
for (int i = 0; i < n; i++) {
int c = 0;
}
// ループ内の関数は O(1) の空間を占める
// ループ内の関数は O(1) の領域を使用する
for (int i = 0; i < n; i++) {
func();
}
}
/* 線形階 */
/* 線形オーダー */
void linear(int n) {
// 長さ n の配列は O(n) の空間を使用
// 長さ n の配列は O(n) の領域を使用する
vector<int> nums(n);
// 長さ n のリストは O(n) の空間を使用
// 長さ n のリストは O(n) の領域を使用する
vector<ListNode> nodes;
for (int i = 0; i < n; i++) {
nodes.push_back(ListNode(i));
}
// 長さ n のハッシュテーブルは O(n) の空間を使用
// 長さ n のハッシュテーブルは O(n) の領域を使用する
unordered_map<int, string> map;
for (int i = 0; i < n; i++) {
map[i] = to_string(i);
}
}
/* 線形時間(再帰実装) */
/* 線形オーダー(再帰による実装) */
void linearRecur(int n) {
cout << "再帰 n = " << n << endl;
if (n == 1)
@@ -53,9 +53,9 @@ void linearRecur(int n) {
linearRecur(n - 1);
}
/* 二乗階 */
/* 二次オーダー */
void quadratic(int n) {
// 二次元リストは O(n^2) の空間を使用
// 二次元リストは O(n^2) の領域を使用する
vector<vector<int>> numMatrix;
for (int i = 0; i < n; i++) {
vector<int> tmp;
@@ -66,7 +66,7 @@ void quadratic(int n) {
}
}
/* 二次時間(再帰実装) */
/* 二次オーダー(再帰による実装) */
int quadraticRecur(int n) {
if (n <= 0)
return 0;
@@ -75,7 +75,7 @@ int quadraticRecur(int n) {
return quadraticRecur(n - 1);
}
/* 指数時間(完全二分木の構築) */
/* 指数オーダー(パーフェクト二分木の構築) */
TreeNode *buildTree(int n) {
if (n == 0)
return nullptr;
@@ -85,15 +85,15 @@ TreeNode *buildTree(int n) {
return root;
}
/* Driver Code */
/* 実行用コード */
int main() {
int n = 5;
// 定数階
// 定数オーダー
constant(n);
// 線形階
// 線形オーダー
linear(n);
linearRecur(n);
// 二乗階
// 二次オーダー
quadratic(n);
quadraticRecur(n);
// 指数オーダー