Dsa
Hashing
Warm-up
Find First Repeated Character
Given a string, find the first character that appears more than once. If no character is repeated, return '-1'. Your result should be case-sensitive.
Example:
Input:
abca
Output:
a
Key concepts
hashingstringssearching
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now