Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
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
This comment is hidden because it contains spoiler information about the solution
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 thefor
loop is vectorized" I think this is not the case for you.This comment is hidden because it contains spoiler information about the solution
Okay, thanks.
"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.
Hello,
I'm working in R and running into issues regarding large values (specifically going from 170 to 171). Is the remark at the bottom of the description an indication that we will need to install a package to handle large inputs? Or is there a way to work around the 171 problem in base R? Note: I am only wanting a "Yes, there is a way to work around the 171 problem in base R" or "No, there is not a way to work around the 171 problem in base R." I have never tried installing packages in CodeWars and therefore have no idea if it is even a thing or not.
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.
Hello,
I am attempting to double check that I am thinking about the indexing properly on this kata. My understanding is that I want to minimize both i and j. Does i take priority? Does that mean the following:
testing(27345, c(23745, 2, 3)) would be the correct answer
as opposed to:
testing(27345, c(23745, 3, 2))
Provided i takes priority. I would want to take the 7 and move it behind the 3 (i=2 goes to j=3) rather than moving the 3 ahead of the 7 (i=3 goes to j=2).
Is this correct thinking?
Thank you!
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.
Does anybody know how CodeWars' algorithm for suggested Kata on your front page works?
When I first started it seemed as if CodeWars was challenging me by giving me a kata that was ranked one better than what I was currently at (giving me a 6 while I was a 7). I then stopped frequenting the site as often (maybe every 3-4 days instead of everyday) and now it is doing the opposite. It is suggesting katas one below my current rank (giving me a 6 when I am a 5). The one obvious thing to me is how frequently I visit the site. Does anybody know if this plays a role? If not, what does?
I know I could simply search for Katas that are my rank or higher to challenge myself. I am just curious and would like to know if there is something I am missing here or if CodeWars has a logical reason for slowing down how hard they are challenging me.
Thanks!
My goodness. What a doozy. I have been frequenting CodeWars for about a month and this was my 14th kata. Rethinking my logic to improve performance for this particular kata was the most challenging thing I've done thus far on this site. Kudos.
Loading more items...