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

Programming Exercises

Create a component that dynamically generates a grid layout based on a predefined number of rows and columns.

Medium

Problem Statement

Create a component that dynamically generates a grid layout based on a predefined number of rows and columns.

Sample Input

Rows: 3, Columns: 3

Sample Output

A 3x3 grid of divs.

Limits

Time: 2s · Memory: 256 MB

Code Editor

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

import React from "react";
 
 const DynamicGrid = () => {
  return <div>{/* Render grid here */}</div>;
 };
 
 export default DynamicGrid;