G
Girish Sahani
Given a length k string,i want to search for 2 substrings (overlap
possible) in a list consisting of length k-1 strings. These 2 substrings
when 'united' give the original string.
e.g given 'abc' i want to search in the list of 2-length strings
['ab',ac','cd','bc','bd'] to extract either
1) 'ab and 'ac' OR ('a' common)
2) 'ab' and 'bc' OR ('b' common)
3) 'ac' and 'bc' ('c' common)
In all these cases, one of the letter is common in the 2 strings.
Out of the k-1 letters in each length k-1 string,k-2 will be common.
Another e.g is:
Given 'abcd' and list ['abc,'abd','bcd'],i must extract
1)abc and abd OR ('ab' common)
2)abc and bcd OR
3)abd and bcd OR
Here 2 letters are common in all the solutions.
I havent been able to figure out a method. Pleeez help!!
Thanks in advance,
girish
possible) in a list consisting of length k-1 strings. These 2 substrings
when 'united' give the original string.
e.g given 'abc' i want to search in the list of 2-length strings
['ab',ac','cd','bc','bd'] to extract either
1) 'ab and 'ac' OR ('a' common)
2) 'ab' and 'bc' OR ('b' common)
3) 'ac' and 'bc' ('c' common)
In all these cases, one of the letter is common in the 2 strings.
Out of the k-1 letters in each length k-1 string,k-2 will be common.
Another e.g is:
Given 'abcd' and list ['abc,'abd','bcd'],i must extract
1)abc and abd OR ('ab' common)
2)abc and bcd OR
3)abd and bcd OR
Here 2 letters are common in all the solutions.
I havent been able to figure out a method. Pleeez help!!
Thanks in advance,
girish