I have a collection:
List> dependencyHierarchy;
The first item in pair is some object (item) and the
Perfect example to use a topological sort :
http://en.wikipedia.org/wiki/Topological_sorting
It will give you exactly what you need.