Ad
  • Custom User Avatar

    For Java kata description, add the case for Tie game.

    Where both players got the same score

  • Custom User Avatar

    Yes, my enum consists only of 2 values PING and PONG

    But it wants for some reason for value BINK to be there...

  • Custom User Avatar

    Hi, only I receive this error in java ?

    No enum constant Dinglemouse.Player.BINK
    

    I just implemented my own enum called Player, but seams like I am not able to do so...

    Renaming the enum also doesn't help.

    enum Player {
        PING, PONG;
    
        public String toLowerCase() {
            return this.toString().toLowerCase();
        }
    }
    
  • Custom User Avatar

    Clever way of cheating :)

  • Custom User Avatar

    Hello everyone!

    Can somebody please explain me this example:

    ant a ant anatttt
    

    I see here 5 ants, 2 are alive and 3 are dead, however testcase expects other result

    expected:<4> but was:<3>
    

    PS: Used language, Java

  • Custom User Avatar

    What is y[] used for ?

  • Custom User Avatar

    I was able to solve using Math.random and not implementing my own algorithm.

    I don't think this is an expected behaviour, passed using Java.

  • Custom User Avatar

    A small recomandation is to create separate testcases, and not placing all verifications in one test.
    I got stuck for a long time on finding that dublicates points should be ignored.

    Example for java:

    ...
    
    @Test
    public void dublicatePointsTest() {
        assertEquals(3, Solution.countRectTriang(new Point[]{
                new Point(1, 2), new Point(4, -1), new Point(3, 3),
                new Point(4, -1), new Point(4, 1), new Point(1, 1),
                new Point(4, -1), new Point(4, -1), new Point(3, 3),
                new Point(1, 2)
        }));
    }
    
    ...
    
  • Custom User Avatar

    Thanks, my main issue was comparing floating values like 12.999999999999998 and 13.

  • Custom User Avatar

    How for example triangle DCE is a rectangle triangle ?

    Sides:
    [x=4,y=1] -> [x=1,y=1] = 3.0
    [x=1,y=1] -> [x=4,y=-1] = 3.605551275463989
    [x=4,y=-1] -> [x=4,y=1] = 2.0
    
  • Custom User Avatar

    Hi guys, can someone pls help me with the part to check if triangle is a rectangle one.

    I use the basic formula a^2 + b^2 = c^2 where c is the biggest side of the triangle. However, my algorigthm had found 0 triangles so far.

    Let's take for example the triangle ABC from description's picture.
    There are 3 rounded wides

      AB = 2 
      BC = 2 
      AC = 3
    

    which is obvious that this is not a rectangle triangle.

  • Custom User Avatar

    Very great kata, however will be nicer if you added more testcases and some edge examples. I enjoyed it a lot :)

  • Custom User Avatar

    Wonderfull kata, I enjoyed it a lot

  • Custom User Avatar

    Can somebody help me with this example to understand

    BOSS: andy
    tim 8
    jim 6
    randy 0
    sandy 9
    andy 4
    katie 8
    laura 4
    saajid 9
    alex 3
    john 9
    mr 0
    SUM OF ALL PERSONS: 60
    SUM WITH DOUBLE POINTS BOSS: 64
    RATING: 5
    

    expected:<[Nice Work Champ]!> but was:<[Get Out Now]!>

    64 / 11 = 5, why its other result expected

  • Custom User Avatar

    Thanks for your briliant idea!

    I have implemented this, and now its much easier to understand whats going on, on the chess board. Also I decresed the number of tests from 500_000 to 10_000(not sure how many tests should be, but at least they are not so many now).

    Cheers :P

  • Loading more items...