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

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

中級 · 4 難しい · 4

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

すべてのチャレンジ

トピック、言語、難易度で検索できます。

8件のチャレンジ
難しい

Strongly Connected Components

Count groups of nodes that can all reach each other.

学べること グラフアルゴリズムTarjan または Kosaraju
AdvancedCompetitive-programmingGraphs
まだ解答がありません
中級

Shortest Weighted Routes

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

学べること ダイクストラ法遅延削除
GraphsPriority-queuesShortest-path
まだ解答がありません
難しい

Longest Path in a DAG

Find the heaviest path in a task dependency graph.

学べること トポロジカル順序DAG 上の DP
AdvancedGraphsHackathonTopological-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
まだ解答がありません
難しい

Course Schedule Order

Order courses so every prerequisite comes first.

学べること カーンのアルゴリズム閉路の検出
AdvancedGraphsHackathonTopological-sort
まだ解答がありません
中級

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
まだ解答がありません
中級

Tree Diameter

A tree is a connected undirected graph with no cycles.

学べること 2 回の BFS隣接リスト
GraphsTrees
まだ解答がありません
中級

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

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

学べること A* 探索ヒューリスティック
GraphsGridsShortest-pathai
まだ解答がありません