educative.io

Space complexity of Paths in Maze

The space complexity of this solution is O(V^2)

It looks like the space complexity comes from the adjacency list. Is it actually just O(E)?


Course: Grokking Coding Interview Patterns in Python - AI-Powered Learning for Developers
Lesson: Solution: Paths in Maze That Lead to Same Room - Grokking Coding Interview Patterns in Python