Going to bed after this but will check in the morning
If I have an array, say:
['0', '0', '0', '0', '0'],
['0', '0', 'W', '0', '0'],
['0', 'W', '0', '0', '0'],
['0', '0', '0', '0', '0'],
['0', '0', '0', '0', '0']
] ```
And I wanted to find the distance of every "0" from any "W", how should I go about this?
Thanks in advance for any suggestions- saw something about BFS algorithms online but a bit confused by them considering it's 1 am and wondering if there isn't an simpler way to go about it. Thanks and goodnight~