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.
Good comment. I've tried to do the same solution, but then, like, wait a minute...what if the test will be not 27 or 153, what if
the number will be very huge, like 325352952095239525. It will be not optimal solution and take much more time.
amazing kata,
this is the first 4 kyu kata i have ever completed and i have to say it took me a solid hour and a half, but man i was almost sure i wouldnt be able to do it.
really challenging and meticulous kata. However,
the last part of the desciption regarding what you should do if the length of the strings was the same,
was poorly explained and it took a lot out of me until i figured it out.
cheers.
Thanks!
This is definitely clever (props to you 0lexa!) but who's voting Best Practices on this?
110 character lines?
Single char variable names everywhere
No comments
Not knocking the code, it's ingenuious (and about 1/6 the size of my solution) but it's more code golf than best practices.
.
The prefix is included.
1 < 2 < =
This comment is hidden because it contains spoiler information about the solution
Well it's certainly succinct but the main argument for using functional methods like reduce is they are supposed to aid code readability and maintainability. This reads like you've run it through a minifier.
Sudoku is some kind of puzzle. In start you have some small amount of numbers in game field. Your task is to fill the playing field with the rules described above: each line, column, diagonal and "small square" must contain only 1..N numbers without repeating. That is all the game.
Thanks rOg!
I am learning and I am trying to keep the code clean
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
You're right about using an array or object literal but I'll take the ifs over a switch any day. A switch is like an if with extra steps. I'm with Crockford on that one, not even once!
Learn functional programming they said. It's easier to read and maintain they said. You won't even need to comment it they said.
Loading more items...