Two ends of a string
Read · 1 of 3
Two pointers
Put one finger at the start (l) and one at the end (r). Compare, then move both inwards. When they meet, you've checked everything in half the steps.
Read · 1 of 3
Put one finger at the start (l) and one at the end (r). Compare, then move both inwards. When they meet, you've checked everything in half the steps.