8 lines
213 B
Plaintext
8 lines
213 B
Plaintext
// CALL: COUNT_BASES('A', "GATTACA")
|
|
// EXPECT: COUNT_BASES returned 3
|
|
To count the B bases in T:
|
|
Start with Count at 0.
|
|
For each letter c of T:
|
|
If c is B, add 1 to Count.
|
|
The answer is Count.
|