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.
off-by-one error, my fault.
fixed
Python translation [https://www.codewars.com/kumite/6866886ce4b88cf8390c4b5c?sel=6866886ce4b88cf8390c4b5c]
Negative values with valid bases (2-16) like
#10#-1#,-10,-1_000_000should be determined and (or) exists in tests.Because python author's solution return this as False. Lot of solutions return as True.
Passing tests is a matter of luck, if you dont get such values in random tests.
Today I found letter
ᴙwhich notЯorя.heh, I made a solution that will allow it to be solved for (almost) arbitrary rotation angle. After that I saw other solutions. I think I need to make a kata for arbitrary rotation angle, or figure. btw (here is one)[https://www.codewars.com/kata/58b3c7b9917a5cb4aa0000c5/] similar.
Thanks. Inattention is my credo:)
[-0.21170577194406404, -37.78829422805593] should equal [-37.78829422805593, -0.21170577194406448]please make the comparison approximate
and may be some rules for the order of the roots (or even better, take the roots in any order, and check the sorted roots in the test)
Python translation
tag this kata as
StringsThe specialty of this kata is not a real search for duplicates or uniques, but the use of the property that in the list there are only numbers 1 to some n, without holes, sequentially (not random from any numbers).
On this basis, you can make some assumptions, evaluate some properties of the list, without building a set() or a list of " seen duplicates" etc.
PS. oh, I saw that this is a complaint about the tests passing suboptimal algorithms, so they work very quickly, even set(inList). not just asking for a hint
lets convert
02|15|59, 2|47|16, 02|17|20, 2|32|34, 2|32|34, 2|17|17to seconds. and sorted timings are:8159, 8237, 8240, 9154, 9154, 10036loooks like your algorithm decided to take 8240 as value for median, but here is not even number of items. so median is - average between 8240 an 9154 (check median definition from kata details)
Python translation
I totally understand. It was a joke.
import pandas as pdQ: Why are you importing pandas?
A: The task requires analysis, and what kind of analyst am I without a pandas?
reminded me of a story, "Laboratory Chronicles". where there was something like:
in the documentation we have pressure in megapascals, but how could they know that the graduation on our pressure gauge was in pounds per square inch.
Loading more items...