10 XP challenge
Count Disagreeing Character Positions
easy
Build it yourself · 6 min
1 Learn2 Predict3 Solve
TaskYour mission
Return the number of positions where left and right contain different characters. They have the same length, from 0 to 40, and contain ASCII characters. Matching is case-sensitive.
Examples
| Input | Return |
|---|---|
left = "cat", right = "car"count: 0 → 1. The result is 1. | 1 |
left = "abc", right = "xyz"count: 0 → 1 → 2 → 3. The result is 3. | 3 |
Your code
Write your answer inside Solution, then use return to send it back.
Ln 1, Col 1
JavaScript
Try examples runs the public examples. Check my code checks your full answer and saves your completion.