Now DegeneracySorter takes nodes' list instead of graph