LeetCode 885: Spiral Matrix III - Interview Prep Ep 33

preview_player
Показать описание


Solution explained:
1. we could use an array of directions to control the moving in four directions, this is a common technique that we could apply in a lot of 2-d matrix problem;
2. every time when moving towards the east or west, we'll increase the length by one;
3. we break out of the while loop when we have filled out all the rows.

⭐ Support my channel and connect with me:

// TOOLS THAT I USE:

// MY FAVORITE BOOKS:

My ENTIRE Programming Equipment and Computer Science Bookshelf:

And make sure you subscribe to my channel!

Your comments/thoughts/questions/advice will be greatly appreciated!

#softwareengineering #leetcode #algorithms #coding #interview #SDE #SWE #SiliconValley #programming #datastructures
Рекомендации по теме
Комментарии
Автор

Thank you took me a while to understand your explanation but now it's finally clear!!

PratyushMajumdar
Автор

Very clear explanation.
thank you for doing such amazing work.

vinayakpandey
Автор

Good video, but it will be nice if you speak about run-time and space complexity.

karthikeyansevarajan
Автор

When we are at i=7, d=0 and len=3
we will be getting out of bound exception because the value will be (0, 6)

arifsyed
Автор

Thanks a lot man.. it totally makes sense now

vishwanathveerni
Автор

Very insightful explanation!
Thank you so much:)

suchitragiri
Автор

Great method and great explation.. Thank you..

karthikshetty
Автор

Very nice explanation. how did you come up with the solution?

Whaleshamu
Автор

please share the time complexity and space comlplexity for this solution here in either comment section or in the description

syedmohiuddinh
Автор

if you can share us the link to this code.it will be helpful

syedmohiuddinh
Автор

here you dropped your crown 👑.. great explanation, but still i'll fail the interview if i was asked this question🥲

neelamgagnani