You are viewing a single comment's thread. Return to all comments →
It really is easy if you take time to figure out what makes a valid hourglass first:
https://imgur.com/DaOd88B
Once you realize that an hourglass would never exceed the length of the rows or the columns, you can build your for loops accordingly.
Seems like cookies are disabled on this browser, please enable them to open this website
2D Array - DS
You are viewing a single comment's thread. Return to all comments →
It really is easy if you take time to figure out what makes a valid hourglass first:
https://imgur.com/DaOd88B
Once you realize that an hourglass would never exceed the length of the rows or the columns, you can build your for loops accordingly.