+ 1

CHALLENGE

Two words "alternade" if taking alternating letters from each forms a new word. Write a function 'is_interlocked' that takes a word as input and checks if two or more meaningful words can be formed by this word (subwords need not be of the same length). For example: TOTAL = 'schooled', forms ONE = 'shoe' and TWO = 'cold'. TOTAL ='lacerated', forms ONE = 'let', TWO = 'are' and THREE ='cad'. USING DICTIONARY EX:D={SCHOOLED:(SHOE,COLD,LACERATED,LET,ARE,CAD}

24th Oct 2017, 4:06 PM
sadiya zainab
sadiya zainab - avatar
9 Answers
+ 5
Interesting :) How does one get the initial dictionary (just curious)?
27th Oct 2017, 4:08 PM
Kirk Schafer
Kirk Schafer - avatar
+ 4
Thank u @Gordie !! From "schooled" word even it should form "lacerated" word??
31st Oct 2017, 4:51 PM
sadiya zainab
sadiya zainab - avatar
+ 4
From "schooled" word it needs also to form "lacerated" word!@Gordie
31st Oct 2017, 5:02 PM
sadiya zainab
sadiya zainab - avatar
+ 4
yeah !!schooled={shoe,cold,lacerated}
31st Oct 2017, 5:08 PM
sadiya zainab
sadiya zainab - avatar
+ 3
you have to initalize the dictionary!!@kirk Schafer
31st Oct 2017, 4:46 PM
sadiya zainab
sadiya zainab - avatar