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.
what does mean x or '0'?
and there it was. a whole library that fixes the problem in no time, shitting on my algorithm that timed out 10 different times
Should be used as referee as it is the fastest solution.
Or
gmpy2
should be forbidden asBigInt
is forbidden in Java.why python is too OP?
What? I avoid this approach on purpose. I try to solve these challenges without googling at all. And if I google I only google small part of what I need. After solving it, I look for good solutions among the answers to learn from. This is not one of them. My answer is horrible, but it shows the actual implementation. The solution of this guy is "google a module that solve the entire problem". But I already know how to google. So I'll have a look for someone further down that actually managed to solve the problem
Do you really wish you thought of googling? Because that is all this answer requires if you don't have the library name in your head.
It's like saying "wish I had used chatGPT to solve this problem"
Sure, you may use chatGPT as a tool in your work, but it would remove entire point of coding challenges
Solutions like these aren't allowed in most coding interviews. It's not impressive. It does not show skill. It is not educational. At this point I wonder why even post a solution at all? What do you get from it? It's like voluntarily taking a math quiz for fun, but then copy paste all the answers from the solution manual
Libraries should indeed be used in real life programming of python.
The purpose of coding challenges is however, to learn to think how to use algorithms to solve problems. Not to get a working code for a client.
This guy, using a library to do the entire problem, removed the entire challenge of this kata. He solved a 8 kyu problem at best. It's like getting a math problem and then googling the solution. You learn nothing and getting the answer don't show knowledge or skill. Everyone can google. Importing a library that does litterally the whole challenge... not the purpose of the challenge. Unless you think googling the most easy to understand libraries is super hard, and your goal is to practice them. In that case I suggest going to one of those 75 + year meetings where they teach basic computer knowledge
These goals are not mutually exclusive. Exactly the opposite in most practical cases.
I thought about it later again...
It definitely depends on your goal for training.
If you want to learn libraries, go for libraries.
If you want to learn to program algorithms, then go for that.
I never understood why people get mad at others for using libraries. Its like saying you cant use calculators to do math. I dont understand the gate keeping. idiots praise complexity
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
o
->{"o": ["only"]}
-> 1 letter prefix, 1 word -> 1 = 1 -> OKa
->{"a": ["are","answers]}
-> 1 letter prefix, 2 words -> 1 < 2 -> we will add more letters to make subdivisionsar
->{"ar": ["are"]}
-> 2 letters prefix, 1 word -> 2 > 1 -> Not OKan
->{"an": ["answers"]}
-> 2 letters prefix, 1 word -> 2 > 1 -> Not OKs
->{"s": ["some","solutions]}
-> 1 letter prefix, 2 words -> 1 < 2 -> we will add more letters to make subdivisionsso
->{"so": ["some","solutions]}
-> 2 letter prefix, 2 words -> 2 = 2 -> OK["only", "solutions", "some"]
only -> beginning = o (1 letter, 1 word) OK \\\ Why 'o'? Its only one word here wtf??
are -> beginning = ar (2 letters, 1 word) not OK \\\ Why 'ar'? Its only one word here wtf??
answers -> beginning = an (2 letters, 1 word) not OK \\\ Why 'an'? Its only one word here wtf??
Whats the logic here? Why dont author explain this in the description..
ONLY if their group size (or array length) is equal to the number of shared letters in each beginning
Why the output is
["only", "solutions", "some"] instead of ["solutions', "some"]
The test:
"only some solutions are answers"
Descriptions says: Group them by their beginning!
Loading more items...