Ad
  • Default User Avatar

    how to get this result:

    { "red":1, "blue":1 }, { "red":2, "blue":1 }, "red", [ 5n, 16n ]
    

    ?

    probability to get only one red murble from urn2 is: 2/3 * 1/2 + 1/3 * 2/2 = 2/3.
    thus, probability that there will be exactly 2 red murbles in urn3 is: 1 * 2/3 = 2/3.

    probability to get two red murbles from urn2 is: 2/3 * 1/2 = 1/3.
    thus, probability that there will be exactly 3 red murbles in urn3 is: 1 * 1/3 = 1/3.

    we don't consider 0, 1 or 4 red murbles in urn3, because it is impossible and probabilities for these options are 0;

    if there are 2 red murbles in urn3 then answer is 1/5.
    if there are 3 red murbles in urn3 then answer is 1/2.

    then multiplying probabilities we must get result:
    2/3 * 1/5 + 1/3 * 1/2 = 3/10 (not 5/16). what is wrong with that logic?

  • Default User Avatar

    Interesting kata, but please add some tables'explanation and change their name. For example translations --> language_available.
    In addition, explain the condition, for not_trained, not_ocmpleted etc. better.
    For example, the Charlie case with C is not very understandable.

  • Default User Avatar

    Quick question:

    Is there a number on the max number of colors used? If yes, it might be worth to mention it in description.
    Or is the kata accepting the following solutions for n=6, k=6?

    • [1, 2, 3, 1, 2, 3]
    • [1, 2, 1, 2, 1, 2]

    Also do you plan to port this kata in Python?

  • Default User Avatar

    if no other similar jump-point is available in the direction of the current jump-point, exit the surface in that direction

    Are p and q similar to each other?

    I thought by similar you mean that p only looks for other p and q only looks for other q

  • Default User Avatar

    what is the initial size? 1:sqrt(2)??

    with that size I always get golden ratio nums.

  • Custom User Avatar

    There are quite a few kata's about Sudoku on Codewars. All of them either involve verifiying correctness or solving a puzzle. With this kata I want to introduce specific solver strategies to make progress in a puzzle. Would it be interesting to make a series about specific solver strategies? This kata is aimed at beginners. I could add kata's for other strategies that target Medium, Hard and Expert. Any opinions?

  • Default User Avatar

    It is never explicitly stated that the pair of numbers for the wall are the distance to the north and south walls respectively. And without the ascii illustrations, it's not even explained that the walls are all equally sized segments of the north and south walls. For a moment when starting to read it, I thought perhaps the room was an irregular polygon with a certain number of walls all closing in towards the centerpoint. You should make clear that you are describing a room with flat, unmoving east and west walls, and walls closing in at possibly different jagged distances, from the north and south. And none of the examples in the description describe a situation with unequal north and south walls at a given x coordinate, so without any other demonstration, it's entirely left to the reader to assume that the numbers in the pair represent north and south distances.

  • Custom User Avatar

    Hi,

    • It should be made clear in the description that any clear path will work (in the task/output section)

    • the very first sentence of the description is at least "misleading":

      "Given a scrambled path, return _the number of rotations needed in horizontal direction to make a clear passage from top to bottom."

      => return the rotations needed instead ?

    cheers

  • Custom User Avatar

    [[0, 1, 0, 1], [1, 0, 1, 2], [0]]
    how is answer to this queue 7? can someone explain in simple steps

  • Custom User Avatar

    I don't understand the logic for the types of bridges. According to your reasonning below, if K has a width of 3, B should have a width of 2 and P a width of 1. That, or K should have a width of 2 only

    Question is:

    |      |       | bridge | sensors  |
    | type | lanes | width  | distance?|
    |------|-------|--------|----------|
    |  P   |  "0"  |   1    |    1     |    => could make sense
    |  B   |   1   |   2    |    2     |
    |  K   |   2   |   3    |    3     |
    
    
    |      |       | bridge | sensors  |
    | type | lanes | width  | distance?|
    |------|-------|--------|----------|
    |  P   |  "0"  |   0    |    1     |    => could make sense
    |  B   |   1   |   1    |    2     |
    |  K   |   2   |   2    |    3     |
    
    
    |      |       | bridge | sensors  |
    | type | lanes | width  | distance?|
    |------|-------|--------|----------|
    |  P   |  "0"  |   0    |    1     |    
    |  B   |   1   |   1    |    2     |    => doesn't make sense
    |  K   |   2   |   3    |    3     |
    

    => ?

  • Custom User Avatar

    Throughout the description the s in "Who wants to be ..." is missing in some places.

  • Custom User Avatar
    • Why manhattan distances while diags are possible? (this feels just wrong, actually... :/ => ? )
    • typical sizes of the inputs and number of random tests?
  • Custom User Avatar

    Result of match between both teams

    This does not generalize to 3 way tie or above. Did you mean H2H score?

  • Custom User Avatar

    What was the generalized operator that was hinted at in the description?

    I solved the kata without knowing what it was and I still do not know.

  • Default User Avatar

    Sample tests:
    assert.strictEqual(operator(2,3,2), 4, "operator(2,3,2)");

    Random tests:
    operator(2,3,2): expected 4 to equal 6

    Is it normal?