Build a component that tracks and displays the frequency of each letter in a hardcoded string.
HardProblem Statement
Build a component that tracks and displays the frequency of each letter in a hardcoded string.
Sample Input
hello
Sample Output
Frequency: { h: 1, e: 1, l: 2, o: 1 }Limits
Time: 2s · Memory: 256 MB
Code Editor
Log in to submit00:00
Try your code in this preview. Submit marks it done.
import React from "react"; const LetterFrequency = () => { return ( <div> {/* Display the letter frequencies */} </div> ); }; export default LetterFrequency;