Ad
  • Custom User Avatar

    (The local variable being, in this case, the declared argument.)

  • Custom User Avatar

    You definitely should remove the comment in the initial code // points is an array of points with at least two points. Because it's not.

  • Custom User Avatar

    Thanks, it's much clearer now. :)

  • Custom User Avatar

    I don't get this test :

    URICodec.decode("%3B%2C%2F%3F%3A%40%26%3D%2B%23%24%61%62%63%64%65%66%67%68%69%6A%6B%6C%6D%6E%6F%70%71%72%73%74%75%76%77%78%79%7A%41%42%43%44%45%46%47%48%49%4A%4B%4C%4D%4E%4F%50%51%52%53%54%55%56%57%58%59%5A%30%31%32%33%34%35%36%37%38%39%2D%5F%2E%21%7E%2A%27%28%29")
    // Expected: %3B%2C%2F%3F%3A%40%26%3D%2B%23%24abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_.!~*'()
    

    The description says "Any encoded characters that should not have been encoded for the context should not be decoded in that context.". The character "a" should not have URI-encoded so why is it URI-decoded ?

  • Custom User Avatar

    Perfect! :)
    EDIT : Also, you could delete the part that says that days must not have leading zeroes, cause they won't have.

  • Custom User Avatar

    You may consider using another example in your description for the expected date format. 9/5/2014 can lead to confusion as we don't know which of 9 and 5 is the day or the month. The dates shown in the examples are more explicit, because of the 13 obviously. ^^

  • Custom User Avatar

    The tests are fixed now. Thank you :)

  • Custom User Avatar

    Ok, I got it.
    Your second test does not like when the array passed as argument is modified in place... I had to make a copy to get it passed.
    (Maybe you should make a copy in the test, or specify in the description that the input array must not be modified)

  • Custom User Avatar

    I was a bit confused when I realised that a strike on the 9th turn would actually take into account the score made on turn 11th, which is an extra ball... The sentence "Points scored using these extra balls only count once." in the description may be a bit misleading.

  • Custom User Avatar

    This makes it more clear, thanks. I will think about it.

  • Custom User Avatar

    Description says "Given an array of n x n", therefore the test should not send [[]] which is an array of 1 x 0 ...

  • Custom User Avatar

    So the input is always a valid big triangle made of smaller triangles ?

  • Custom User Avatar

    You should add a test that don't use the alpha variable, to force the use of binding.

    I'd suggest something like :

    var random = Math.random(); // Can not be guessed
    var o = {};
    o[random] = alpha;
    alpha = null; // Prevents the use of alpha
    Test.assertEquals(o[random].getNameFunc()(), o[random].name);
    
  • Custom User Avatar

    I was about to click "Clever", then I saw the "Throw an exception" part. This is really ugly.

  • Custom User Avatar

    What would be the result if we remove the upside down triangle in row 2 in the example given in the description, for example ?

    [[[3,0],[2,1],[4,1]], //row 1
    
    [[2,1],[1,2],[3,2]], //row 2
                         // Removed triangle here
    [[4,1],[3,2],[5,2]],
    
    [[1,2],[0,3],[2,3]], //row 3
    [[2,3],[1,2],[3,2]], //note this triangle is upside down
    [[3,2],[2,3],[4,3]],
    [[4,3],[3,2],[5,2]],//note this triangle is upside down
    [[5,2],[4,3],[6,3]]]
    
  • Loading more items...