Change of structure : adjacence matrix to kind of adjacence list. Pass all tests except 7,8,9 because time exceeded.