Sum-String

Revision en1, by abhishah501, 2016-10-26 19:39:40

Given a string determine whether it is a ‘sum-string’. A string is called a sum-string if it satisfies the following properties: len(s)>3 sub-string(i,x) + sub-string(x+1,j) = sub-string(j,l) example: “12358” is a sum string. Explanation : 1+2 = 3 ; 2+3 = 5 ; 3+5 = 8 “199100199” is a sum string. Explanation: 1+99 = 100 ; 99+100 = 199 “2368” is not a sum string.

Can anyone help me solve this question.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English abhishah501 2016-10-26 19:39:40 422 Initial revision (published)