データ構造シリーズ パート1
このステップを始める開始スタック、キュー、二分木、ハッシュテーブル、連結リスト。それぞれをJavaでゼロから実装し、実際に問題を解くのに使います。終えるころにはArrayDequeとHashMapが内部で何をしているかがわかります。Javaの面接が掘り下げてくるのは、まさにそこです。開始Javaのコレクションは、まさにこれらのデータ構造です。ArrayDeque、HashMap、PriorityQueue、TreeMapは、それぞれキュー、ハッシュテーブル、ヒープ、平衡木です。このパスでは、そのひとつひとつをJavaで実装し、それを使ってソート、再帰、グラフ探索を行い、最後は採点付きの面接問題で締めくくります。無料、ブラウザ完結、ほとんどのコースに修了証が付きます。
377 レッスン228 チャレンジ702 クイズの問題
各ステップは、すでにあるCoddyのコースの組み合わせで、どの「開始」ボタンもコースをJavaで開きます。まだJavaで教えていない3つのコースは、ステップのあとに載せています。
ArrayDequeとHashMapが内部で何をしているかがわかります。Javaの面接が掘り下げてくるのは、まさにそこです。開始PriorityQueueは自分で書いたことのある二分ヒープになり、TreeMapは仕組みのわかる平衡木になります。あなたのものがAVL木なのに対し、あちらは赤黒木です。開始Arrays.sortはプリミティブ型にはクイックソートの変種を、オブジェクトには安定なマージソート系のソートを使います。その理由は、このステップを終えればわかります。開始>>>を加えたものです。開始専用ページPriorityQueue、つまりステップ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.
HashMapやPriorityQueueは毎日使っていても、ここではハッシュテーブルと二分ヒープを自分で書きます。だから、どのJava面接官も投げかける追加の質問、つまり衝突が起きたら何が起こるのか、poll()のコストはどれくらいかに答えられます。next参照を持つNode<T>は、読んで理解できる連結リストです。ArrayDequeはスタックまたはキュー、LinkedListは双方向連結リスト、HashMapとHashSetはハッシュテーブル、PriorityQueueは二分最小ヒープ、TreeMapとTreeSetは赤黒木で、ステップ2で作るAVL木と同じく平衡二分探索木です。トライ木やグラフのクラスはないので、それらは自分で書きます。ArrayDequeです。StackはVectorを継承したレガシークラスなので、すべての呼び出しが同期化され、スタックにあるべきでないリストのメソッドまで受け継いでいます。Javaのドキュメント自体も、代わりにDequeを使うよう勧めています。面接官はそこを見ています。定石の1行はDeque<Integer> stack = new ArrayDeque<>();です。>>>もあるからです。