finding repeated data sequences in a column

bearophileHUGS at lycos.com bearophileHUGS at lycos.com
Wed May 20 12:53:33 EDT 2009


yadin:
> How can I build up a program that tells me that this sequence
> 1000028706
> 1000028707
> 1000028708
> is repeated somewhere in the column, and how can i know where?

Can such patterns nest? That is, can you have a repeated pattern made
of an already seen pattern plus something else?
If you don't want a complex program, then you may need to specify the
problem better.

You may want something like LZ77 or releated (LZ78, etc):
http://en.wikipedia.org/wiki/LZ77
This may have a bug:
http://code.activestate.com/recipes/117226/

Bye,
bearophile



More information about the Python-list mailing list