Ad
  • Custom User Avatar

    It was interesting for me to find a working solution but I wouldn't motivate myself enough to optimize it in order not to run into timeouts

  • Custom User Avatar

    Without seeing your code it's impossible to tell whether your approach is good or not. The solution has to be O(n) to pass the tests in time (literally, iterate over the vector once), and from the words "everything within the for loop is vectorized" I think this is not the case for you.

  • Custom User Avatar

    "Yes, there is a way to work around the 171 problem in base R" because there is nothing peculiar with 171 but maybe you must change your approach to the problem.
    "Is the remark at the bottom of the description an indication that we will need to install a package to handle large inputs?"" No, only to take the good way.
    You can't install packages at CW.

  • Custom User Avatar

    Yes, it's explained in the second example, first i, then j. And check the values of your indices, they start at 0, so the index for 7 is 1, not 2.

  • Custom User Avatar

    One thing trainer suggestions are related to is recently trained language: you are suggested kata which are available in this language, and kata of suggested rank is somehow relative to your rank for this language. Another thing is probably "training mode" selected in "your next challenge" area: "rank up", "Practive and Repeat", and a couple of others.
    Exact formulas are not well known, and actually not many people find trainer suggestions useful. With a simple search with filters which suit you, you will probably find some nice kata easier.