Ad
  • Custom User Avatar

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

  • Default User Avatar

    nice. also demos what a great language R is for writing short and sweet code.

  • Custom User Avatar

    The problem description is NOT totally correct. it's not how many rats died. We have a total of 10 rats. That's it. These rats are put on position numbered from 0 to 9, so total 10 rats.
    1000 bottles of wine are also numbered from 0 to 999. Then each bottle of wine is polled into the glasses in front of the rats according to the binary representation of the bottle number, that is: if the bottle number has bit 1 for position i (0<=i<=9), then poll wine into the glass of that position.
    The numbers we received should be the position number of the rats.

  • Custom User Avatar

    Not an issue.

  • Custom User Avatar

    The description stated length less than 3 should return false, but this is not implemented. Non letters should not be considered

  • Custom User Avatar

    Not an issue. The reason for using the t statistic is in the description (you do not know the population standard deviation, so you need a t statistic). More details for those who are interested can be found in the linked articles. Thank you for the suggestion to use test values from different distributions. I'll consider that.

  • Custom User Avatar

    more sample test to know whether the code is working?

  • Custom User Avatar

    should ask the function to return a tuple with the order swapped

  • Custom User Avatar

    In the intro might be useful to add why the T statistic is used. Most are more familiar with the 2 standard deviation. Also maybe using test values from different distributions e.g poisson or runif to see how skew the CI can be