Question bank › Arrays
Dsa Arrays Medium

Maximize Product of Three

Given an array of integers, find three numbers whose product is maximal and return that product. The input consists of a single line with space-separated integers of the array. The output should be a single integer which is the maximum product of any three numbers. Example: Input: -10 -10 5 2 Output: 500 Explanation: The maximum product is from -10 * -10 * 5 = 500.

Key concepts

arrayssortinggreedy

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
Part of InterviewLab's verified interview question bank. We show the prompt and concepts to practise with — never a copy-paste solution.