question 1
The method runs on bbeex. How many characters has it written just after it reads the first x?
the answer, and why
the answer is B
Reading the first e ended bb, so 2b. Reading the first x ended ee, so 2e. 2b2e is 4 characters; x is written only at the end.
if you chose another
- That is 2b alone. Reading the first x also writes ee's run, 2e.
- That is the whole code, 2b2e1x. The last run is written only at the end.
- That counts the runs met so far, bb, ee and x. Only runs that have ended are written.