nhtrnm's blog

By nhtrnm, 10 years ago, In English

I want to find a problem like this:
Given a string s and array a of words, split s using words from a so that the least characters were left without matching to any of words.
So given s = 'aabbac' and a = {'aabb', 'c', 'aab', 'bac'} I expect s to be splited into not into because the last option gives me an extra character.
I am quite sure there is a problem like this somewhere in the web, but can anyone give me a link to it?
Thanks.

  • Vote: I like it
  • +11
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it