Amazon Interview QuestionJava Developers
- 0of 0 votes
Given a string T of length n, partition it in n' "phrases" (p1, p2, ..., pn'),
pi = pj + c, for some j<i, where + is string concatenation and c is a character
p0 = ''
p1 = pj + c where j < 1
T = p1 + p2 + ... + pn'
T = aababcabcd = a + ab + abc + abcd
p1 p2 p3 p4
Country: United States