diff options
| author | Paulo Custodio <pauloscustodio@gmail.com> | 2021-01-26 21:44:53 +0000 |
|---|---|---|
| committer | Paulo Custodio <pauloscustodio@gmail.com> | 2021-01-26 21:44:53 +0000 |
| commit | 8902910406fe11ec55932be70d1df508f61c083d (patch) | |
| tree | 3957c77f4eb6affa650ef3bd5d8e2f33f1980904 /challenge-096 | |
| parent | 536dafb989fad8da4c2df0df1bfc22eb2fac3706 (diff) | |
| download | perlweeklychallenge-club-8902910406fe11ec55932be70d1df508f61c083d.tar.gz perlweeklychallenge-club-8902910406fe11ec55932be70d1df508f61c083d.tar.bz2 perlweeklychallenge-club-8902910406fe11ec55932be70d1df508f61c083d.zip | |
merged
Diffstat (limited to 'challenge-096')
| -rw-r--r-- | challenge-096/paulo-custodio/basic/ch-2.bas | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/challenge-096/paulo-custodio/basic/ch-2.bas b/challenge-096/paulo-custodio/basic/ch-2.bas index 8d88019f32..669ab1bebf 100644 --- a/challenge-096/paulo-custodio/basic/ch-2.bas +++ b/challenge-096/paulo-custodio/basic/ch-2.bas @@ -84,7 +84,9 @@ sub wag_fish_dist(a as string, b as string) ' search shortest path in priority SE, E, S if i < len(a) and j < len(b) then dr = SE: delta = d(i+1,j+1) - d(i,j) - min_dr = dr: min_delta = delta + if delta < min_delta then + min_dr = dr: min_delta = delta + end if end if if j < len(b) then dr = E: delta = d(i,j+1) - d(i,j) |
