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

Programming Exercises

Implement an efficient function to find the first non-repeating character in a given string.

Hard

Problem Statement

Implement an efficient function to find the first non-repeating character in a given string.

Sample Input

"gogolang"

Sample Output

l

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
package main import "fmt" func firstNonRepeatingChar(s string) rune { // Your code here } func main() { fmt.Println(string(firstNonRepeatingChar("gogolang"))) // Expected Output: "l" }
Log in or sign up to run or submit your code.Log inSign up
Input
"gogolang"
Expected Output
l