Matrix Traversal by expanding outwards from a point?
问题 Sorry if the title isn't clear. I wasn't sure how to phrase it without an example. So the goal is to traverse a matrix in all directions as fast as possible when starting at a single point(could be anywhere in the matrix). My idea was to use a 2D array and expand outwards in all directions from that single point almost like an explosion. The problem I ran into when developing such an algorithm is that it becomes wildly inefficient when pixels are expanding outwards and exploring already