Ad
  • Custom User Avatar

    Don't undertand your logic. How iterator type depends on position of smallest in array?

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Look at begining of your function. Empty array is {}

    {{}} - array containing 1 empty array.

    ;)

  • Custom User Avatar

    I can prepare a fork with a fix if you want

    I've already solved it anyway. But sure forthcoming users will appreciate your work.

  • Custom User Avatar

    C++ - does not work when removed using namespace std

  • Custom User Avatar

    Which is better than brute force O(n^2)

    Not so easy. long long type have a limited size and hence n won't be too big. Also in "brute force" method you can make cheap iteration, especially by avoiding insert and erase string functions.

  • Custom User Avatar

    Numeration from 1 is bad idea, because formulas for faster calculation requires numeration from 0

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Why not? Me, and as I see, some people in comments stumble at this point.

    So I guess it would be good to warn about this moment. And - if possibe - to upgrade test ceses.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    C++: please don't put function declaration in test cases - user can't change types of arguments.

  • Custom User Avatar

    Another example of good math trolling :)))

  • Custom User Avatar

    C++ : is it so hard was give to helper function another name?

  • Custom User Avatar

    I've passed all tests except random with results:

    Expected: false
    Actual : true

    That's not too much clear. In most katas we can make debug output of incoming data, but here incoming data is the expression itsels.

    Then question: how can I see the case I failed on?

  • Loading more items...