Ad
  • Default User Avatar

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

  • Default User Avatar

    const isLeapYear = y => y % 16 ==0
    this is also my solution but it fails lets say for the year 4 or 8 !!!
    Yes it need to have test cases for this years too!

  • Custom User Avatar

    Yes, especially confusing considering in the example 'coffee' > 'eecoff' results in 2, but in the tests it expects 4 (going the opposite direction). I honestly feel like the description is asking us to go forward but the tests actually want us to go backward.

  • Custom User Avatar

    I agree, the story is nonsense and should just be replaced with a short problem description like yours: "Given a list ls of positive integers, find the length k sublist with largest sum <= t".