Ad
  • Custom User Avatar

    Hi there! 👋

    I'm the author of this kata, but during beta testing, the warriors decided to make it 5 kyu. If you can influence the level of this kata, I would really appreciate it! 😊

  • Custom User Avatar

    Your solution should have O(n) time complexity to pass extra large tests

  • Custom User Avatar

    Thank you for your valuable feedback! The time complexity has been added to the task description. Unfortunately, the task's difficulty level is not set by the author; it is determined by the first solvers during the beta testing phase

  • Custom User Avatar

    Thanks for the comment! The task requires algorithms with a time complexity of O(n). To ensure that slower algorithms are not used, we need some way to check this. Very large input data is used for this purpose

  • Custom User Avatar

    Just to clarify, the problem statement ensures that the cost array will always have a length equal to or greater than the value of days. This means you won't encounter test cases where the cost array is shorter than the number of days, as in the example you mentioned.

  • Custom User Avatar

    Have you observed a scenario in random tests where money=10, days=2, and cost=[7]? In Python, the cost array's length is generated to be equal to or greater than the days value

  • Custom User Avatar

    Thank you for the valuable advice! This test has been added to the code

  • Custom User Avatar

    The word 'consecutive' was put in italics to make it more noticeable

  • Custom User Avatar

    The consecutive part of the task is illustrated by the test case (10, 2, [3, 7, 6]) -> money: 10

  • Custom User Avatar

    In the written random tests, the probability of responses with “money: …” and “days: …” is approximately equal. I point this out because calculating the response for “days: …” might take longer

  • Custom User Avatar

    Hello! For JavaScript, the maximum length of the cost array is 1.5 million, and the maximum length of the days array is 300,000

  • Custom User Avatar

    Thanks a lot! Changed as suggested. (data url)

  • Custom User Avatar

    Excellent!

    • Additionally, I would include the output of the number of elements in cost (length of cost) in the Extra Large Random Tests, ensuring all input data is shown in the error message
    • It's better to name individual random tests differently. Instead of using 'occurred --> expected', it's preferable to use 'Small random test 1', 'Medium random test 4', and so on.
    • In the basic tests, I would suggest adopting a similar approach to other languages. For instance, name the test 'Single day rental' or 'Cheapest day rental', and include the values of the variables money, days, and cost in the error message
    • The value of 'days' is fixed across all 10 tests. It would be better to make it different for each individual test
  • Custom User Avatar

    Thank you for your contribution! It's been taken into account

  • Custom User Avatar

    Thanks for your remark! The word consecutive has now been highlighted in the task description

  • Loading more items...