Challenge: Find the Maximum Product of Two Integers in a List

Let's write a function to find the maximum product of two integers in a list.

Problem statement

Implement a function find_max_prod(lst) that takes a list of numbers and returns a maximum product pair.


A list of integer numbers


Two integers

Sample input

lst = [1, 3, 5, 2, 6]

Sample output

result1, result2 = 5, 6

Coding exercise

Take a close look at this problem and design a step-by-step algorithm first before jumping to the implementation. This problem is designed for your practice, so try to solve it on your own first. If you get stuck, you can always refer to the solution provided in the solution section. Good luck!

Level up your interview prep. Join Educative to access 70+ hands-on prep courses.