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.
Learned something new!
The kata's description is horrendously lazy. And it leaves a lot of specs out of the table, even in the context of the linked Wikipedia article:
[A-Z# ]
, but this is really because the tests are too lazy.There are no tests that validate
stop
is handled correctly. Every test can be passed by processing every character except the last (and ignoringstop
altogether).I like the flow of this task.
It is just lovely!
Going to solve more tasks of the author.
Thank you.
Nice kata! There is a typo in the sample tests, at the
group by
section:query().select().from(persons).groupBy(profession, name).execute() [i.e., SELECT * FROM persons WHERE profession = "teacher" GROUPBY profession, name]
. There should be no 'WHERE' I asume.Well I have another pending translation that seems to be lost in the nether because I couldn't convince any Rust people to review it, so I thought I'd have a better chance doing something in Python. xd
I did see the other fork, I'll double check but I'm pretty sure I also fixed that typo (and others) in my translation. I'll spend some more time double checking my random test generator when I get a moment and see if I can find convince someone on the Discord to review this.
You certainly picked an ambitious target for your first translation. I'd suggest getting a thorough review from someone proficient in writing kata in Python, i.e. not me.
Probably needs forking; the description was changed for below solved issue.
Fork approved. ( You may want to ask Hobs for the mender role. )
Python translation
Implemented random tests to match o2001's implementation as much as possible.
I made a typo in the description; the error thrown should be of the form "duplicate [query]" not "duplicated [query]". Otherwise, everything is good to go. While at it, I've added clause order tests to the fixed tests so the users don't have to wait till random tests to discover problems with their implementation. Fork here
Approved
Fork of the original JS version:
having
only accepts a single function, and it passes, while the author's intention washaving
accepting arbitrarily many functions. Based on the author's solution, I have put an addendum in the description to standardize the requirements.I have kept the author's solution as the submission solution and have put my revised solution (which I have tested against the author's on dozens of thousands of runs and they match every single time) as the reference solution in the random tests since it's more compact and to cross-verify. Please review this fork and tell me if anything needs to be tuned. Adding random tests to this kata was a huge undertaking and took a long time to get right, but I believe it's bug-free by now based on the hundreds of thousands of tests I've run.
Great Kata! Finally solved it, and my solution isn't that bad.
Just tried the go version, I'm pretty sure your solution is just inefficient.
There are more than 417 tests in the Go version. If your solution takes around
2500ms
(not including the compile time) for only one time test ofn=550
, I'm pretty sure it's not good enough. The reference solution itself took only around0.15ms - 0.19ms
for that input.Try another approach.
Loading more items...