Reduce running time of DegreeSortedGraph.reverse(int) from O(V) to O(1)