mirror of
https://github.com/krahets/hello-algo.git
synced 2026-11-04 12:12:45 +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:
@@ -9,10 +9,10 @@ namespace hello_algo.chapter_stack_and_queue;
|
||||
public class queue {
|
||||
[Test]
|
||||
public void Test() {
|
||||
/* キューを初期化 */
|
||||
/* キューを初期化する */
|
||||
Queue<int> queue = new();
|
||||
|
||||
/* 要素をエンキュー */
|
||||
/* 要素をエンキューする */
|
||||
queue.Enqueue(1);
|
||||
queue.Enqueue(3);
|
||||
queue.Enqueue(2);
|
||||
@@ -20,20 +20,20 @@ public class queue {
|
||||
queue.Enqueue(4);
|
||||
Console.WriteLine("キュー queue = " + string.Join(",", queue));
|
||||
|
||||
/* キュー先頭の要素にアクセス */
|
||||
/* キューの先頭要素にアクセス */
|
||||
int peek = queue.Peek();
|
||||
Console.WriteLine("先頭要素 peek = " + peek);
|
||||
Console.WriteLine("キューの先頭要素 peek = " + peek);
|
||||
|
||||
/* 要素をデキュー */
|
||||
/* 要素をデキューする */
|
||||
int pop = queue.Dequeue();
|
||||
Console.WriteLine("デキューした要素 pop = " + pop + "、デキュー後の queue = " + string.Join(",", queue));
|
||||
Console.WriteLine("デキューした要素 pop = " + pop + "、デキュー後 queue = " + string.Join(",", queue));
|
||||
|
||||
/* キューの長さを取得 */
|
||||
int size = queue.Count;
|
||||
Console.WriteLine("キューの長さ size = " + size);
|
||||
|
||||
/* キューが空かどうかを判定 */
|
||||
/* キューが空か判定 */
|
||||
bool isEmpty = queue.Count == 0;
|
||||
Console.WriteLine("キューが空かどうか = " + isEmpty);
|
||||
Console.WriteLine("キューは空か = " + isEmpty);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user