Beta

Passing through jugglers

Description
Loading description...
Puzzles
Algorithms
Graph Theory
  • Please sign in or sign up to leave a comment.
  • Unnamed Avatar

    https://www.codewars.com/kata/reviews/5db0c65918d8df0001818183/groups/5dc8b4ab2d55c30001fe5a96 This solution sometimes fails at the "tiny" random tests. A corresponding fixed test should be added.

  • Voile Avatar

    The actual tests doesn't seed the RNG with current time so the test cases are actually deterministic.

  • Voile Avatar

    using namespace std; is still required in sample tests.

  • ZED.CWT Avatar
    Assert::That(getMinBalls(J), Equals(getMinBallsAuthor(J)));
    

    Inputs are vulnerable to user functions Should calculate expected result before sending to user functions

    auto expected = getMinBallsAuthor(J);
    Assert::That(getMinBalls(J), Equals(expected));
    
    • Tassle Avatar

      Thanks for the feedback, this is my first Kata and I must admit that I don't quite know how this testing stuff really works ^^

      Issue marked resolved by Tassle 6 years ago
  • ZED.CWT Avatar
    main.cpp:53:9: error: use of undeclared identifier 'queue'
            queue<int> q({s});
            ^
    main.cpp:53:18: error: expected '(' for function-style cast or type construction
            queue<int> q({s});
                  ~~~^
    main.cpp:53:20: error: use of undeclared identifier 'q'
            queue<int> q({s});
                       ^
    main.cpp:55:16: error: use of undeclared identifier 'q'
            while(!q.empty()){
                   ^
    main.cpp:56:21: error: use of undeclared identifier 'q'
                int u = q.front(); q.pop();
                        ^
    main.cpp:56:32: error: use of undeclared identifier 'q'
                int u = q.front(); q.pop();
                                   ^
    main.cpp:61:21: error: use of undeclared identifier 'q'
                        q.push(e.to);
                        ^
    7 errors generated.
    

    Dont relay on includes by user code This should be also put in the test part

    #include<vector>
    #include<queue>
    using namespace std;