XP is just a number | |
PerlMonks |
Re^2: Brute force vs algorithm (PWC # 100)by LanX (Saint) |
on Feb 15, 2021 at 19:26 UTC ( [id://11128412]=note: print w/replies, xml ) | Need Help?? |
That's what you meant? :) ("abusing" List::Util::reduce() to window two neighboring cells)
<Reveal this spoiler or all in this thread>
editThat's O(m) = O(n**2) with m:= #cells , n:= #rows and m = n*(n+1)/2
Cheers Rolf
updateadded comments to code
In Section
Meditations
|
|