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

Programming Exercises

Build a component that finds the maximum product of any two numbers in a hardcoded array and displays the result.

Hard

Problem Statement

Build a component that finds the maximum product of any two numbers in a hardcoded array and displays the result.

Sample Input

Array: [5, -2, 3, 1, -4]

Sample Output

Maximum Product: 20

Limits

Time: 2s · Memory: 256 MB

Code Editor

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

import React from "react";
 
 const MaxProduct = () => {
  return (
  <div>
  {/* Display the maximum product */}
  </div>
  );
 };
 
 export default MaxProduct;