Retrieves the nodes in a graph that have no children
See also
Other analyze graphs:
find_all_paths(),
find_path(),
find_path_one_to_many(),
get_all_roots(),
get_leaves_under(),
get_roots_over(),
least_common_parents()
Examples
graph <- graph_builder() |>
  add_path(c("A", "B", "C")) |>
  add_path(c("A", "D", "C")) |>
  add_path(c("Z", "B", "C")) |>
  add_path(c("Z", "B", "H")) |>
  build_directed()
get_all_leaves(graph)
#> # of nodes: 2
#> |           Nodes           |
#> |             C             |
#> |             H             |
#>