Build a component that finds the maximum product of any two numbers in a hardcoded array and displays the result.
HardProblem 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
Log in to submit00:00
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;