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

Programming Exercises

Write a component that implements a custom debounce function and displays the debounced input value.

Hard

Problem Statement

Write a component that implements a custom debounce function and displays the debounced input value.

Sample Input

Hardcoded delay: 500ms

Sample Output

The input value updates only after the user stops typing for 500ms.

Limits

Time: 2s · Memory: 256 MB

Code Editor

Try your code in this preview. Submit marks it done.

import React, { useState } from "react";
 
 const DebouncedInput = () => {
  return (
  <div>
  <input type="text" placeholder="Type here..." />
  <p>Debounced Value: </p>
  </div>
  );
 };
 
 export default DebouncedInput;