This repo shows example of testing your fine tuned algo with alteranate algo that always return right result but takes more time computationally.
Find the maximum product of two distinct num- bers in a sequence of non-negative integers.
Input: A sequence of non-negative integers.
Output: The maximum value that can be obtained by multiplying two different elements from the sequence.
Example Input -
Input - 3
1 2 3
Output - 6
In this two algo are defined to achieve objective mainSolution.py is fine tuned algo
where as alteranateSolution.py algo is used to check algo provided in mainSolution.py
test_generator.py file generates tests to check both algo gives equal result
if output of both algo are not equal on certain input then find a bug then run tests again.
You can run stress testing by running command
python3 main.py 10 - no of test to perform 500 - seed value for random generator