← Swiggy questions
CodingReported in a candidate post, Jul 2025

First non-repeating character with a single 26-size array

Filed under Swiggy

Given a string s, return the index of its first non-repeating character, or -1 if none exists. Refine the solution from using two size-26 arrays to using only one array of size 26.

You've read your 3 free write-ups

Sign up free to keep reading. Your account opens the first 10 questions of every company.

Related Swiggy questions

Collected from public candidate posts and coding forums. Updated Nov 2026.