Sunday, July 5, 2009

Generate all the substrings of len k, of a given string s

An interview question: generate all the substrings of len k, for a given string s. In optimal time and space.

1 comment:

  1. I like this question, since it shows how to count on a bitset vector.

    http://www.di.unipi.it/~gulli/coding/permutation.tgz

    ReplyDelete