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.
Javascript doesn't throw array index out of bounds exceptions. It simply returns undefined.
Since undefined is not equal to any possible value of opposite[dir], this will always evaluate false on the first run of the loop.
it doesnt; it pushes on the first run not pop
what types can't be anticipated?
Yep. I moved it back to draft.
I actually believe the more clear requirements defined as part of a solution than the easier because thats less assumptions I have to make and less things I have to worry about but I guess that's just up to an individual's personal preference. Anyway, I get ya point ;).
(yes, about the performances, the other one might be a bit faster, but the thing is: what makes it a bit harder is to exactly follow the requirements)
(EDIT: you should put this one to draft again, in the meantime)
Ok, I'll work on the other one and we'll see about that. It appeared to me that the other kata contained rules that would allow the code to invalidate a solution sooner (i.e. in doing less work) but I'll do a comparison and let ya know. Thanks.
No, in fact yours is easier to implement because you have less constraints (but that make it a bit more interesting imo, since that allows different approaches). The thing is: the general implementation stays the same. Those differences are only "border effect".
I don't know. I had checked out that kata before I tried to author my own and I really think that kata has some rules/constraints in it that make it a little bit different of a problem. Actually I think it's easier to solve due to some of it's constraints that this one doesn't impose.
Ok, let me check it out.
Damn, there is a bigger problem:
myjinxin katas #003 : Crossword puzzle
=> your kata is actually an almost perfect duplicate (there are some tiny differences, but nothing to make it different enough and this one has already rules for several solutions and surely have random tests already (I don't do JS so I cannot check for that, tho)). So it would actually be better that you unpublish yours, then solve the other and do its java translation... Damn, too bad...
Ok, thanks. I think I get the idea of how to implement the random tests and I'll work on that next. Speeding up my solution might be a little more challenging as that's the reason I think this is a good kata. It should probably be a 4 kyu but I didn't want to scare off code warriors with that rating. So far my algorithm passess all the tests I've made within the timeout interval but as the list of words grew, it was starting to time out so I had to scale it down a little.
What exactly did you mean by "this "pseudo implementation" do not garantee that solutions will be unique, tho (even if it's probable)."? I would think that if I were to build the list of unique words and I were careful about the words generated, this would guarantee that no two solutions would exist for any one crossword problem. This might actually take more than just checking that the words were all unique so I'm open for ideas. Perhaps maybe making each word space size unique and doing some additional tricks with the lettering of the words might help (for the random tests)?
This comment is hidden because it contains spoiler information about the solution
How would I go about implementing the random tests? Could use a little help on that one. lol
Good catch. I appreciate the review. Somehow I made a bunch of updates last night and couldn't get the code to re-publish so some of them were lost because when I tried to re-publish again this morning, I ommitted a few of the updates.
Loading more items...