perlhelp has asked for the wisdom of the Perl Monks concerning the following question:
1.Hash of Number to Array of Position.
2.Hash of Position to (Hash of Number to Array of Position). Thanks
here is the example from the blog.
I have a matrix
note: the matrix can be number or string.
( 1, 2, 3, 4,
and a search string. The task is to find out whether the numbers in the search
string are values in the matrix that are near-by each other along the x and y
coordinates.
"2,7,12,16" should return true
"2,4,7,12" should return true
"1,6,8,12" should return false
"1,5,14,15" should return false
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: perl array matrix
by AnomalousMonk (Archbishop) on Apr 12, 2015 at 08:07 UTC | |
|
Re: perl array matrix
by Laurent_R (Canon) on Apr 12, 2015 at 11:11 UTC | |
by Anonymous Monk on Apr 12, 2015 at 11:59 UTC | |
by Corion (Patriarch) on Apr 12, 2015 at 12:01 UTC | |
by Anonymous Monk on Apr 12, 2015 at 12:09 UTC | |
by Corion (Patriarch) on Apr 12, 2015 at 12:21 UTC | |
| |
|
Re: perl array matrix
by AnomalousMonk (Archbishop) on Apr 12, 2015 at 16:33 UTC | |
|
Re: perl array matrix
by choroba (Cardinal) on Apr 13, 2015 at 12:56 UTC | |
by perlhelp (Initiate) on Apr 15, 2015 at 03:41 UTC | |
by perlhelp (Initiate) on Apr 15, 2015 at 12:43 UTC | |
by choroba (Cardinal) on Apr 15, 2015 at 20:53 UTC | |
by perlhelp (Initiate) on Apr 13, 2015 at 15:01 UTC |