Python String Indexing Time Complexity Graph For Dijkstra