Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: TheAlgorithms/JavaScript
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1d252d7
Choose a base ref
...
head repository: Xolvez/JavaScript
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 9e58468
Choose a head ref
  • 2 commits
  • 2 files changed
  • 1 contributor

Commits on Feb 18, 2023

  1. 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
    Xolvez committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    dc06d95 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9e58468 View commit details
    Browse the repository at this point in the history
Loading