Number of ways between two vertices

Правка en1, от agul, 2015-07-04 22:14:21

Hi!

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?

Теги number of ways

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский agul 2015-07-04 22:14:21 662 Initial revision for English translation
ru1 Русский agul 2015-07-04 22:09:36 704 Первая редакция (опубликовано)