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

Programming Exercises

Build a component that tracks and displays the frequency of each letter in a hardcoded string.

Hard

Problem 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

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;