Maximum Product of Three Numbers Problem
Maximum Product of Three Numbers Problem — ExecCode Easy DSA Practice
Solve the Maximum Product of Three Numbers problem on ExecCode. Free online easy DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.
Problem description
Description You are given an integer array nums, find three numbers whose product is maximum and return the maximum product.
Examples
Input {"nums": [-10, -10, 5, 2]}; Output 500. Input {"nums": [1, 2, 3, 4]}; Output 24. Input {"nums": [1, 0, 1, 0, 1, 0, 99]}; Output 99
Constraints
3 <= nums.length <= 10^4 -1000 <= nums[i] <= 1000
Practice Maximum Product of Three Numbers free on ExecCode. Browse DSA problems, topic map, and placement guides.