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.
very easy to read solution
wat
Easy to read, but it's O(n^2) and there's an even shorter solution that's O(n).
5.0/9.0 can just be 5/9 -- Python 3 automatically converts ints to floats when needed. That's why // (floor divide) is a thing.
Ideally it should be pothole_case(or snakecase as you call it). I guess they are used to typing in other languages more than Python?
But yes, they should not be in CamelCase.
Why are these naming the functions in camelcase (convertToCelsius) instead of snakecase (convert_to_celsius)?
It's difficult to understand, why/ how your code should solve the problem. Imagine this being part of a bigger software - who shall maintain this?
the return value of "1025292944081385001" should be 45001, but yours is -1
come on! it is wrong!
it also states that arguments are of an unspecifed number got to end of how ever many arguments exist but don't overflow works in functions as well
def func(*args): how many arguments 1 500 who knows :)
O(2n) = O(n)
sorry I mixed O(2n) with O(n^2)
Anyone know what the
*
here means? I tried running the code without it and it's a lot different.There are no nested loops, it's O(n). Obviously, there's no O(1) as we have an array.
Is the time complexity of this solution O(n^2)? Is there a solution which is O(n) or O(1) and is also very clean?
Loading more items...