
さまざまなデータ構造(10)二分探索木1
こんにちは。今日は3の倍数の日ではありませんが、2月の更新が9回になってしまうので更新することにします。 前々回・前回の2回で二分木について取り上げました。さらに発展して今回は二分 ...

さまざまなデータ構造(9)二分木2
こんにちは。前回は二分木とその走査について取り上げました。今回はプログラムを整理しておきたいと思います。 二分木を作り走査するプログラム それでは、実行用のプログラムを掲載します。 ...

さまざまなデータ構造(8)二分木1
こんにちは。今回は木構造です。これまでに取り上げた連結リスト、スタック、キューはすべて1方向でした。それに対して、木構造は複数に分岐します。今回は高々2つの分岐までの木を扱います。 ...

さまざまなデータ構造(7)キュー2
こんにちは。前回はキューについて説明しました。今回は、キュークラスとしてまとめます。 キューのプログラム(Java) package data_structure; public ...

さまざまなデータ構造(6)キュー1
こんにちは。引き続きデータ構造について書いていきます。今回はキューです。 キューとは 人気のラーメン屋に並んだことはありますか?私はあります。1時間くらい待ったかな~。待ち行列がキ ...

さまざまなデータ構造(5)スタック2
こんにちは。前回はスタックについて説明しました。今回は、スタッククラスとしてまとめます。 スタックのプログラム(Java) package data_structure; publ ...

さまざまなデータ構造(4)スタック1
こんにちは。引き続きデータ構造について書いていきます。今回はスタックです。 スタックとは 机の上を見てください。ほ~ら、本やらプリントやら山積みになっているでしょう。まさにスタック ...

さまざまなデータ構造(3)連結リスト2
こんにちは。前回に引き続き、今回も連結リストです。今回はいよいよプログラムです。 ちなみに、前の2回が関連するので「片方向リスト用のノード」、「連結リスト1」をご覧ください。 Ja ...

さまざまなデータ構造(2)連結リスト1
こんにちは。前回は片方向リスト用のノードを作っただけで終わりにしてしまいました。今回は、そのノードを使って連結リストを作りたいと思います。 とりあえず、前回の記事(片方向リスト用の ...

さまざまなデータ構造(1)片方向リスト用のノード
こんにちは。今回からデータ構造について数回書いていきたいと思います。(データ活用やデータサイエンスは、プログラムもデータも両方それなりに用意しないと書けないので、まとまった時間が取 ...