Ad
  • Custom User Avatar

    this is already raised there as an issue

  • Custom User Avatar
  • Custom User Avatar

    How about instead raise its difficulty?

  • Custom User Avatar

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

  • Custom User Avatar

    Typo in description : "locigal" instead of "logical".

  • Custom User Avatar

    C#

    In Solution section: typo in the method comment : "// retrun" > "// return".

  • Custom User Avatar

    As of today the description says "there are no duplicates".

  • Custom User Avatar

    done, and i added an assertion message with the input as well.

  • Custom User Avatar

    C#

    The method names should start with capital letter : "Test1", "Testing".

    Each assert should be in separate test method.
    Like so:

            [Test]
            public static void Test1()
            {
                Assert.That(DoubleLinear.DblLinear(10), Is.EqualTo(22));
            }
            
            [Test]
            public static void Test2()
            {
                Assert.That(DoubleLinear.DblLinear(20), Is.EqualTo(57));
            }
            
            [Test]
            public static void Test3()
            {
                Assert.That(DoubleLinear.DblLinear(30), Is.EqualTo(91));
            }
            
            [Test]
            public static void Test4()
            {
                Assert.That(DoubleLinear.DblLinear(50), Is.EqualTo(175));
            }
    

    So that results look like this:

         Test1 Success
         Test2 Failed:   Expected: 57
      Expected: 57
      But was:  55
    
       at Twice_linear___tests.Tests.Test2() in C:\Users\...\UnitTest1.cs:line 16
    
    
    
         Test3 Failed:   Expected: 91
      Expected: 91
      But was:  121
    
       at Twice_linear___tests.Tests.Test3() in C:\Users\...\UnitTest1.cs:line 22
    
    
    
         Test4 Failed:   Expected: 175
      Expected: 175
      But was:  171
    
       at Twice_linear___tests.Tests.Test4() in C:\Users\...\UnitTest1.cs:line 28
    
    

    A shorter way:

            [TestCase(10, 22)]
            [TestCase(20, 57)]
            [TestCase(30, 91)]
            [TestCase(50, 175)]
            public static void Test(int actual, int expected)
            {
                Assert.That(DoubleLinear.DblLinear(actual), Is.EqualTo(expected));
            }
    

    Produces this result:

        Test(10,22) Success
        Test(20,57) Failed:   Expected: 57
    Expected: 57
    But was:  55
    
     at Twice_linear___tests.Tests.Test(Int32 actual, Int32 expected) in C:\Users\...\UnitTest1.cs:line 38
    
    
    
        Test(30,91) Failed:   Expected: 91
    Expected: 91
    But was:  121
    
     at Twice_linear___tests.Tests.Test(Int32 actual, Int32 expected) in C:\Users\...\UnitTest1.cs:line 38
    
    
    
        Test(50,175) Failed:   Expected: 175
    Expected: 175
    But was:  171
    
     at Twice_linear___tests.Tests.Test(Int32 actual, Int32 expected) in C:\Users\...\UnitTest1.cs:line 38
    
    
  • Custom User Avatar

    Why does the example not mention "1 2 4 6 8" as third way to decompose 11?

  • Custom User Avatar

    For C# the opening and closing braces of the class should be at the line start.

  • Custom User Avatar

    Typo in the description in "The digits are sequential, incementing†: 1234" : "incementing" instead of "incrementing".

  • Custom User Avatar

    In C# it expects an array where 3rd element is expected 1 for true, 0 for false, what is your language?

  • Custom User Avatar

    It does : "returns an array/tuple (check the function signature/sample tests for the return type in your language".

  • Custom User Avatar

    For C# method name productFib should start with capital letter - ProductFib.