Ad
  • Default User Avatar

    The two subarrays are sorted in ascending order by their number weights if these weights are different; by their indexes in the string if they have the same weights.

    Your code does not always respect that ordering

  • Custom User Avatar

    Hmmm. This appears to be a quirk of of the assert.closeTo from the test framework
    https://www.chaijs.com/api/assert/#method_closeto

    You can see for yourself by hardwiring different values near the expected boundary.

    function howBiggaMaPizza(blob, crust) {
      return 5.7719999999; // Result: expected 5.7719999999 to be close to 5.773 +/- 0.001
      return 5.772;        // Result: PASS
      return 5.7739999999; // Result: PASS
      return 5.774;        // Result: expected 5.774 to be close to 5.773 +/- 0.001
    }
    

    So your solution needs to be a tiny bit closer to pass.

  • Custom User Avatar

    Which language?