|There's more than one way to do things|
Block Searchby artist (Parson)
|on Oct 04, 2002 at 16:14 UTC||Need Help??|
artist has asked for the wisdom of the Perl Monks concerning the following question:
I want to find the largest block of similar items in the input. The code I have written is here.
This works well if may not be efficient. It finds the first entry of largest block.
$string = 'abbbcddddfegrgrgddeeeeedd'; $answer = '------------------eeeee--'I want to do it in a better way, find all the blocks, starting from largest to smallest and want to extend to 2-D and 3-D and may be higher dimensions. This is not from a programming contest or a homework
Looking for visual solution
Edit kudra, 2002-10-04 Removed unclosed pre tag