go to previous page   go to home page   go to next page

Answer:

1 + 29 == 30


Two Parts of the Problem

How did you compute the length of the string?

1 character followed by a whole bunch more characters

The string consists of a single character, followed by many more characters. The total length of the string is:

length( first character of the string ) + length( all but the first character )

which is

1 + length( tail of the string )

If only we had a way to find the length of the tail of the string....


QUESTION 3:

How can you figure out the length of the tail of the string?