naivegreedy uses adjacency list now.
naive improved