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
@@ -12,15 +12,15 @@ import java.util.*;
public class hashing_search {
/* ハッシュ探索(配列) */
static int hashingSearchArray(Map<Integer, Integer> map, int target) {
// ハッシュテーブルの key: 目標要素、value: インデックス
// ハッシュテーブルにこの key がなければ -1 を返す
// ハッシュテーブルの key:目的の要素、value:インデックス
// ハッシュテーブルにこの key が存在しない場合、-1 を返す
return map.getOrDefault(target, -1);
}
/* ハッシュ探索(連結リスト) */
static ListNode hashingSearchLinkedList(Map<Integer, ListNode> map, int target) {
// ハッシュテーブルの key: 目標ノード値、value: ノードオブジェクト
// ハッシュテーブルにこの key がなければ null を返す
// ハッシュテーブルの key:目的のノードの値、value:ノードオブジェクト
// ハッシュテーブルにこの key が存在しない場合、null を返す
return map.getOrDefault(target, null);
}
@@ -29,23 +29,23 @@ public class hashing_search {
/* ハッシュ探索(配列) */
int[] nums = { 1, 5, 3, 2, 4, 7, 5, 9, 10, 8 };
// ハッシュテーブルを初期化
// ハッシュテーブルを初期化する
Map<Integer, Integer> map = new HashMap<>();
for (int i = 0; i < nums.length; i++) {
map.put(nums[i], i); // key: 要素、value: インデックス
map.put(nums[i], i); // key:要素、value:インデックス
}
int index = hashingSearchArray(map, target);
System.out.println("対象要素 3 のインデックス = " + index);
System.out.println("目的の要素 3 のインデックス = " + index);
/* ハッシュ探索(連結リスト) */
ListNode head = ListNode.arrToLinkedList(nums);
// ハッシュテーブルを初期化
// ハッシュテーブルを初期化する
Map<Integer, ListNode> map1 = new HashMap<>();
while (head != null) {
map1.put(head.val, head); // key: ノード値、value: ノード
map1.put(head.val, head); // key:ノードの値、value:ノード
head = head.next;
}
ListNode node = hashingSearchLinkedList(map1, target);
System.out.println("対象ノード値 3 に対応するノードオブジェクトは " + node);
System.out.println("目的のノードの値 3 に対応するノードオブジェクトは " + node);
}
}