FunctionRacerProblemsRace

Count Differing Positions

BeginnerStringsPython, JavaScript, TypeScript, Java, C++

a and b have the same length. Return the number of positions i where a[i] is not equal to b[i].

Example 1

a "karolin"
b "kathrin"
returns 3

They differ at 3 positions.

Constraints

Race itor take your time

Write it in your browser, against the clock. The model solution, stepped through line by line, comes after.

More Strings problems