function leaves = find_leaves(adj_mat)
%
% Find the leaves (childless nodes) of a rooted tree.

leaves = [];
for i=1:length(adj_mat)
  cs = children(adj_mat, i);
  if length(cs) == 0 % o is a leaf
    leaves = [i leaves];
  end
end
