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.
i agree, i really dont know what to do
this is a ethical issue
This is not a kata issue.
This comment has been deleted.
Fixed.
Fixed (for Java at least).
This comment is hidden because it contains spoiler information about the solution
Brute-force approach would not work as there is another mathematical approach in O(1) complexity
Please, could you explain the solution? I'm kinda lost on what was done and why it worked.
Thanks
Cool, thanks.
Yep. I suppose you're looking at the Python version. You might want to look into Python, and perhaps reference the version(s) that were relevant around the time this kata was created.
FWIW, there was a time (at the time this kata was created) when
class ClassName(object):
was the "best practices" way to create classes in Python.... but I'm sure you knew that.This comment is hidden because it contains spoiler information about the solution
Hello, so an important concept in Object-Oriented Programming is INHERITANCE
So for example lets say you have a class Animal.
Now you create a class Dog(Animal)
any methods(functions) and parameters that were inside an Animal class is now also used by your Dog Class.
In the case of the question, the Class Ball(Object) means that the class Ball inherits the properties of the Class Object
This allows you to reuuse code from one class in a different class without needing to redefine the same methods and parameters.
I recommend you go watch a few videos on youtube to better understand this. Personally, I think that learning Java will help you understand Object-Oriented-Programming better.
In the recursive call.
This comment is hidden because it contains spoiler information about the solution
Not an issue. You're not returning anything.
Loading more items...