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.
Maybe constructor != initialize (cuz in c++ it returns a new object or something I'm not sure cuz I use python)
me too, sir
still solvable without much math, there are clever tricks but a good way to practice ds as you can see with other's solutions.
great point and very much agree
This comment is hidden because it contains spoiler information about the solution
@Sennsei:
Why do you solve katas then? Why complicate your life? Not everything ones does in life is to show off.
Why do you assume he isn't good at one already? BTW, you're talking to XRFXLP as if he created this kata. Well, he didn't.
Don't learn every language, but it helps if you can explore different stuff in other languages and incorporate things in your favorite language. (after learning one language well)
That's mostly true, but it depends on context. Notice how this kata is tagged with keywords like 'functional programming' and 'higher-order functions': within that context that is certainly 8kyu. It sometimes depends on language too - 7kyu kata in JS could be 3kyu in BF, or for any theorem proving languages like coq/agda, requires a lot more math knowledge, even for easiest ones. Solving katas in C is almost always harder than something like python / js, but because only 1 rank can be set for all languages, it's usually chosen for one that's easier to implement.
Nope, but the description can't be tailored to every single solver of every skill level - it's aimed at average user. Search engines like Google exist, and every word or phrase that doesn't make sense to you - you can search for, and learn quickly. Most katas, even 8kyu, can teach you some things. If you expect to be able to solve everything without research, I hate it to break it to you - it's not gonna happen.
I suggest to think about yours too. Are you here to complain, or to learn? The choice is yours :>
Well, that's the problem: it's not that easy to tell. Difficulty is very subjective, and what is easy for one, is difficult for another.
I agree that higher order functions are becoming more and more fundamental thign in modern programming, and that it's not any advanced programming topic anymore. I know that the solution to the kata is almost trivial.
But, on the other hand, I know how confusing and difficult to grasp the concept of a function itself is for newbies, let alone a higher order function. I personally believe this kata is not an 8 kyu problem, not because of code, and not because of the required coding skill, but because I realize how confusing the concept is. That said, I understand people who say it is 8 kyu.
fair point. should this kata be 7kyu?
This comment is hidden because it contains spoiler information about the solution
The first example is not working because it avoids "implicit type casting", but the same is not avoided in your friend's code.
An example to illustrate the stuff:
In the second case, 1 which is of 'number' type gets converted to 'boolean' type (which is
true
since it is truthy value) but in the first case there's no such type casting, and as a result that returnsfalse
.In the test cases, you are given
1
as input, which breaks the first code.This comment is hidden because it contains spoiler information about the solution
Try talking to average, 8 kyu, entry level newbie and explain them what you mean by "passing a function to a function", then you will see :)
The current description makes complete sense to me. It's not cluttered, gives you the correct information... what's the problem?
Try to read comments below. The thing, is that if YOU understand it doesn't mean others too. Just think of the other ppl.
How am I suppose to know what you meant creating this kata? You consider it as 8kyu level?
I thought that 8kyu is for noobs who want to learn something to help them move on.
The satisfaction of this kata is telling me smth else.
Why are you colecting points here if you don't want to showoff? You want to know everything but you don't want to be good at one language? If it's your path..
What is your point of create katas? Do you like to complicate ppl lives :D?
I can't even check the "bool" if it's true or not... You want me to set this on my own? Same with the func1/func2.
I think it's kinda pointless to learn every language avaible bcs you do not write program in the same exact way as you do in other language. Don't you think you can lose yourself?
"But sometimes I love to see how things are different in different language, that's a good experience, you might wanna try that."
Nah, I think I don't have enough time and skills right now to jump from one language to the other just to see the difference. Maybe in 5-10 years when I'll be good at one I try others if I don't quit earlier :).
Do you work with python, js, etc.?
Loading more items...