 function [Lst, Mark] = dfs(u, A, Lst, Mark)
%% function [Lst, Mark] = dfs(u, A, Lst, Mark)
%% dfs from node u - Post-order list
[ii, jj, rr] = find(A(:,u));
Mark(u) = 1; 
for k=1:length(ii) 
     v = ii(k);
     if (~Mark(v)) 
         [Lst, Mark] = dfs(v, A, Lst, Mark);
     end
end
Lst = [u,Lst]

