Ad
  • Custom User Avatar

    I believe this solution is wrong (and if it is, then the test cases are too).
    Taking as an example the number: "12345678987654321", your solution yields the following products:

    [ 24, 120, 360, 840, 1680, 3024, 4032, 4032, 3024, 1680, 840, 360, 120 ]
    

    There the last value is 120 when it should be 24 (4 * 3 * 2 * 1). The problem resides I think in the for-condition.