Practice Real Company Assessment Patterns • Latest 2025–2026 Mock Tests

Programming Exercises

Implement a program to find the first non-repeating character in a string.

Medium

Problem Statement

Implement a program to find the first non-repeating character in a string.

Sample Input

A hardcoded string: "swiss"

Sample Output

The first non-repeating character is: w

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
fun main() { val input = "swiss" // Add your code here to find the first non-repeating character }
Log in or sign up to run or submit your code.Log inSign up
Input
A hardcoded string: "swiss"
Expected Output
The first non-repeating character is: w