Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> And when one doesn't do it right, one will just end-up visiting each cell anyway.
And I think there is no algorithm which can guaranty otherwise. consider this input
no matter which top-down search you apply, you can move the 1 in a way that it's only found at last try. Which means all cells needed to be visited.°
update°) NB: complexity big O() calculations are about worst case (if not stated otherwise )
Cheers Rolf In reply to Re^5: Brute force vs algorithm (PWC # 100)
by LanX
|
|