Problem 3884 · Easy

First Matching Character From Both Ends

Compare each index with its mirror position from the other end; the first equal pair is the answer.

Open the interactive visualisation