Add dfs implementation

For graph implemented as list of lists. Convert to array the first
list so that we can get vertex neighbours in O(1)