Data:
Result: Local minima array ( )
empty list;
for do
list of adjacent vertices to ;
if for all then
  append to ;
end
end
Algorithm 2: Local minima algorithm.