Graphsのコーディングチャレンジ

8 問のコーディングチャレンジでGraphsを練習しましょう。難易度はやさしいものから難しいものまで。どれもブラウザで動き、すぐにテストでき、AI のレビューやコミュニティの解答と比べられます。

中級 · 4 難しい · 4

練習できるスキル: 2 回の BFSA* 探索BFSDAG 上の DPTarjan または KosarajuUnion-Findカーンのアルゴリズムクラスカル法グラフの彩色グラフアルゴリズムダイクストラ法トポロジカル順序
  • Python · C++ · C#
  • 自動テスト
  • AIコードレビュー
  • コミュニティの解答
341
チャレンジ数
245
共有された解答
9
対応言語

すべてのチャレンジ

名前やトピックで検索したり、難易度で絞り込んだりできます。

8件のチャレンジ
難しい

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

学べること トポロジカル順序DAG 上の DP
上級GraphsHackathonTopological-sort
難しい

Strongly Connected Components

Count groups of nodes that can all reach each other.

学べること グラフアルゴリズムTarjan または Kosaraju
上級競技プログラミングGraphs
難しい

Course Schedule Order

Order courses so every prerequisite comes first.

学べること カーンのアルゴリズム閉路の検出
上級GraphsHackathonTopological-sort
難しい

Minimum Network Connection Cost

Choose undirected links so that every vertex can reach every other vertex, with minimum total cost.

学べること クラスカル法Union-Find
Disjoint-setsGraphsMinimum-spanning-tree
中級

Shortest Weighted Routes

Find the minimum total route cost from city 1 to each city.

学べること ダイクストラ法遅延削除
GraphsPriority-queues最短経路
中級

重み付きグリッド上の A* 探索

ゲームやロボットの経路探索を支える A* で、地形コストのグリッドを横切る最安の経路を求めます。

学べること A* 探索ヒューリスティック
Graphsグリッド最短経路ai
中級

Tree Diameter

A tree is a connected undirected graph with no cycles.

学べること 2 回の BFS隣接リスト
Graphs木構造
中級

Can We Split Into Two Teams?

Decide whether people can be assigned to two teams so that each listed pair is on opposite teams.

学べること グラフの彩色BFS
BipartiteGraphs