Today I faced this problem: https://www.hackerearth.com/codex-6-0/algorithm/dummy-4-1/.
Problem statement in short: there are ones and zeroes in two-dimensional array N × N. How many ways do exist between top-left corner and bottom-right corner, if you can travel in horizontal or vertical directions only (not only down/right but in any direction) and you cannot visit any cell twice? N ≤ 100
All accepted solutions are simple bruteforce, that gets TL on array 100x100 with all zeroes in it.
What is the approach to solve this problem?