algo — C++23 日本語リファレンス GitHub

tree_dfs

関数 · 木の基本関数

template <graph_type G>
std::vector<int> tree_dfs(const G &g, int r = 0);

概要

根rからのDFS行きがけ順を返す

テンプレートパラメータ

名前 説明
G グラフ型(list_graph<T> / csr_graph<T> のいずれでも可)

計算量

関連項目