s=: 'Hello Jello'

Given a string like the above, I need to tabulate the number of occurrences of 
every letter for every prefix of length >=k. I also need to know the length of 
the prefix. So:

<prefix length> <prefix> <letter> <count>

As an example, prefix length=3, prefix=ell, letter=o, count=2

In my real use case k may be quite large (say 20) and the string may be very 
long. The final form needs to be something I can slice and dice thereafter 
(like perhaps a sparse array). I'd be grateful for any advice as to how to 
tackle this.

Emir
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to