Programming Exercises

Write a component that identifies the first non-repeating character in a hardcoded string and displays it.

Hard

Problem Statement

Write a component that identifies the first non-repeating character in a hardcoded string and displays it.

Sample Input

"swiss"

Sample Output

First Non-Repeating Character: w

Limits

Time: 2s · Memory: 256 MB

Code Editor
00:00
import React from "react"; const FirstNonRepeatingChar = () => { return ( <div> {/* Display the first non-repeating character */} </div> ); }; export default FirstNonRepeatingChar;
Log in or sign up to run or submit your code.Log inSign up
Input
"swiss"
Expected Output
First Non-Repeating Character: w