Link to Question:
https://leetcode.com/problems/shortes...
Time: O(N) → each cell is guaranteed to be enqueued at most once
Space: O(N) → space used in queue (we determined above that at most we enqueued N cells, therefore an upper bound on worst case space complexity is O(N))