データ構造シリーズ パート1
このステップを始める開始スタック、キュー、二分木、ハッシュテーブル、連結リスト。それぞれをC++のクラスとポインタでゼロから実装し、実際に問題を解くのに使います。これを終えると、std::stack、std::queue、std::unordered_mapは自分で書いたことのある構造になります。開始STLは、このパスをライブラリにしたものです。std::vector、std::unordered_map、std::priority_queue、std::setは、それぞれ動的配列、ハッシュテーブル、ヒープ、平衡木です。そのひとつひとつをC++のクラスとポインタで実装し、あとはどの呼び出しのコストもわかったうえでSTLを使います。ビット演算もC++そのもので教えています。無料、ブラウザ完結、ほとんどのコースに修了証が付きます。
394 レッスン228 チャレンジ702 クイズの問題
各ステップは、すでにあるCoddyのコースの組み合わせで、どの「開始」ボタンもコースをC++で開きます。まだC++で教えていない2つのコースは、ステップのあとに載せています。
std::stack、std::queue、std::unordered_mapは自分で書いたことのある構造になります。開始std::priority_queueはデフォルトで最大ヒープです。一度自分で書いてしまえば、std::greaterで反転させるのは自明です。開始std::sortはたいていイントロソート(ヒープソートに切り替わるクイックソート)で、std::stable_sortはマージソートです。その選択がなぜ理にかなっているのかが、このステップでわかります。開始std::vectorに置き換えられます。開始std::greaterを指定したstd::priority_queue、つまりステップ2のヒープをライブラリにしたものです。開始Write real code, query databases, build websites, and master AI prompts. Our interactive lessons cover every skill modern developers need.
Stay consistent and watch your progress grow! Track your daily coding habit, protect your streak with freeze days, and earn rewards for showing up every day.
12 days streak
Return tomorrow to keep your streak!
January 2026
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
21
22
23
24
25
26
27
28
29
30
Double or Nothing
Day 5 of 7
Streak Freeze
2 left
Take your coding journey on the go! No setup, no downloads - just open and start coding. Available on iOS, Android and Web with 4.9 star ratings.
Compete on global leaderboards, invite friends to earn rewards, and celebrate each other's wins. Coding is better with friends!
Read, listen, test yourself, ask the AI, or look up anything you've already covered. Every lesson meets you where you are.
A variable is a named container that stores a value you can reference later in your program.
In Python, you create one by writing the name, an equals sign, then the value you want to store.
The value can change over time - reassigning the name simply points it to a new value.
Earn certificates for every course you complete. Add them to your LinkedIn profile and resume to showcase your coding expertise to employers.
std::vectorは動的配列、std::stackとstd::queueはデフォルトでstd::dequeの上に作られたアダプタ、std::listは双方向連結リスト、std::unordered_mapとstd::unordered_setはハッシュテーブル、std::priority_queueは二分ヒープ(PythonやJavaと違い、デフォルトは最大ヒープ)、std::mapとstd::setは平衡二分探索木で、実際には赤黒木です。トライ木やグラフのコンテナはないので、それらは自分で書きます。std::unordered_mapの検索がなぜ平均で定数時間なのか、std::mapがなぜキーをソート済みに保つのかを理解し、そのあとはどこでもSTLを使いましょう。コンテストでも面接でも、手書きの赤黒木を期待する人はいません。求められるのは、正しいコンテナを選び、そのコストを知っていることです。std::vectorかstd::unordered_mapになります。std::vectorは必要です。初めて見るものがあれば、まずCoddyのC++コースが無料でそれらを扱います。このパスは、そのコースが終わるところから始まります。