リソース · ガイド・記事
Queue
FIFO のキューを1段落で定義しています。enqueue は末尾に追加し、dequeue は先頭から取り出し、peek は先頭の項目を読みます。
確認日
元のサイトを開く: Queue (元のサイトを新しいタブで開きます)ロードマップに追加
取り組んでいるロードマップにこのリソースを追加できます。自分用の追加リソースとして表示され、ロードマップの手順は変わらず、記録した手順数にも数えられません。
出典コンテンツの言語:英語
Read this in other languages: 简体中文, Русский, 日本語, Français, Português, 한국어, Українська In computer science, a queue is a particular kind of abstract data type or collection in which the entities in the collection are kept in order and the principle (or only) operations on the collection are the addition of entities to the rear terminal position, known as enqueue, and removal of entities from the front terminal position, known as dequeue. This makes the queue a First-In-First-Out (FIFO) data structure. In a FIFO data structure, the first element added to the queue will be the first one to be removed. This is equivalent to the requirement that once a new element is added, all elements that were added before have to be removed before the new element can be removed. Often a peek or front operation is also entered, returning the value of the front element without dequeuing it. A queue is an example of a linear data structure, or more abstractly a sequential collection. Representation of a FIFO (first in, first out) queue
PrepKit の概要
この概要は PrepKit 編集部がソースリポジトリをもとに執筆・確認したもので、リソース本文の引用ではありません。
- 対象
- ソースにレベルの記載はありません
- 形式
- リファレンス
扱っている内容
- FIFO の順序のルールと、任意の peek 操作
- FIFO のキューの図
使い方
PrepKit の学習アドバイスであり、ソースの主張ではありません。
2つのスタックでキューを実装し、各要素がスタック間を最大1回しか移動しない理由を説明してください。
範囲と制約
ページに計算量の表、実装の説明、演習はありません。
利用方法と形式
GitHub の trekhleb/javascript-algorithms(MIT)にある短い README で、7つの翻訳へのリンクがあります。英語で、無料です。
PrepKit が 2026/10/02 に確認しました。 リソースの出典のコミット: 85293e3e2b88
この概要の根拠
- src/data-structures/queue/README.md
この項目を掲載しているページ
PrepKit ニュースレターを受け取る
任意です。PrepKit の利用には必要ありません。