mirror of
https://github.com/TheAlgorithms/JavaScript.git
synced 2025-07-08 12:35:16 +08:00

* fix: fixed error in the MaxProductOfThree algorithm Fixed the error in the MaxProductOfThree by initializing the max and min variables to null instead of -1. The checks were then altered to check for null instead of -1. Also wrote more tests, which randomly generated small arrays and compared the output of the maxProductOfThree-algorithm to the output of a slower, but complete, function which calculates all posible triple-products of the values of the array. Fixes: #1294 * fix: Added newlines at the end of the files