Dsa
Math
Medium
Max Product of Two Numbers
Given an array of positive integers, find two distinct numbers in the array such that their product is maximized. Return that maximum product. The input will be a single line of integers separated by spaces.
Example:
Input:
3 5 1 7 9
Output:
63
Key concepts
mathcombinatoricsarray
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now