First Non-Repeating Problem
First Non-Repeating Problem — ExecCode Easy DSA Practice
Solve the First Non-Repeating problem on ExecCode. Free online easy DSA practice in Strings - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given the input needed to solve First Non-Repeating. Your task is to compute the required answer and return first non-repeating char or -1. A text tool receives characters in a specific order. In First Non-Repeating, the answer depends on handling those characters carefully, including duplicates and order. s: input string.
Examples
Input {"s": "swiss"}; Output w. Input {"s": "racecar"}; Output e. Input {"s": "aabb"}; Output -1
Constraints
1 <= len(s) <= 10^5
Practice First Non-Repeating free on ExecCode. Browse DSA problems, topic map, and placement guides.