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.
count + lag(count,1) over (partition by date order by date)
code issue != kata issue, closing!
I solved it without them, but I really wish I didn't...
Looks like you did (=:
This comment is hidden because it contains spoiler information about the solution
This input expects the following result:
{'a': 318009, 'b': 196418, 'c': 0, 'd': 0}
So the problem is in your logic, not in the kata. Hint: read again the definition of
move
not an issue => closing. Cheers
Looks like this is a faulty test case (for Golang)
{"mov a 1", "mov b 1", "mov c 0", "mov d 26", "jnz c 2", "jnz 1 5", "mov c 7", "inc d", "dec c", "jnz c -2", "mov c a", "inc a", "dec b", "jnz b -2", "mov b c", "dec d", "jnz d -6", "mov c 18", "mov d 11", "inc a", "dec d", "jnz d -2", "dec c", "jnz c -5"}
Once the iteration reaches index 13 (counting from 0), the "jnz b -2" moves to "inc a" and does so until "b" reaches zero. Then it goes to index 16 and executes "jnz d -6" going back to "mov c a". Everything works fine until it reaches index 12 and executes "dec b". "b" is no longer 0 so instruction at index 13 is executed again and again and ... well it's an infinite loop now. Please correct me if I misunderstood how "jnz" works.
You don't actually test the input that makes your code crash.
So why same test cases are passed as sample tests?
Tests are fine. The error comes from your code. You miss the input your code fails on.
This comment is hidden because it contains spoiler information about the solution
Yes, my bad. TY
I've just tried them and they are ok. Try resetting the tests (after saving locally your code or you'll lose it).
Looks like Golang tests are broken:
codewarrior/kata_test [codewarrior/kata.test]
./kata_test.go:17:5: undefined: items
./kata_test.go:18:4: undefined: result
./kata_test.go:19:4: undefined: k
./kata_test.go:20:11: undefined: items
./kata_test.go:20:17: undefined: k
./kata_test.go:20:19: undefined: result
It would be nice to have "Regular Expressions" tag added here
5kyu i think
Loading more items...