Am to write a program that takes a string of digits, S and then caluclates the next term S1 of the sequence.
For Example, if S is "10444221" then S is described from left to right as
"one 1, one 0, three 4's, two 2's, one 1"
This string is converted into digits from left to right resulting in an S1 value of "1110342211".
Anybody have idea on how the program will be in java..Thank you