Ad
  • Default User Avatar

    Wow you really went all out developing a bigint library to solve it. Impressive!
    It looks like it will work all the way up to getPolydivisible(Number.MAX_SAFE_INTEGER,b)

    I went the opposite direction and tried for very terse with only 3 arrow functions and a constant.

    In mine ...
    isPolydivisible works for arbitrary length strings but might be limited by the stack size since it is recursive
    getPolydivisible will break if the result is greater than Number.MAX_SAFE_INTEGER
    also there is no error checking so it relies on appropriate inputs

    Its always fun to see the many different ways people solve katas