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.
I didn't realize that. Thank you for pointing that out.
It is inherated from C language on which Python interpreter is based on.
It could be any number larger than 4.
The kata asks you to minimize the "total" traveling distance for potential students, not the "individual" travelling distance for individual students.
That is no issue...
Corrected
I assume you were putting some tag in " has won the fight."
Spelling fixed, thanks.
You can use
console.log()
for sneaking in...;)Did you manage to find out? I'm facing the same problem.
This is as intended. It's meant to immitate similar instructions on real hardware. For example, consider the operation PUSHA (as part of the X86 instruction) set. It pushes registers in order
EAX, ECX, EDX, EBX, ESP, EBP, ESI, EDI
Whereas its corresponding restore instruction POPA pops registers in order
EDI, ESI, EBP, ESP, EBX, EDX, ECX, EAX
This way, a PUSHA will save all general registers to the stack, and a subsequent POPA will restore them in the exact order they were in previously.
Yeah had the same issue. So I just flipped the popr and poprr methods...
Currently it looks like this:
stack: push 1, push 2, push 3, push 4
popr: pop from stack -> d, pop from stack -> c, pop from stack -> b, pop from stack -> a
-> a = 1, b = 2, c = 3, d = 4
poprr: pop from stack -> a, pop from stack -> b, pop from stack -> c, pop from stack -> d
-> a = 4, b = 3, c = 2, d = 1
So with popr "in order" means that the registers A -> D are filled the same way the values where pushed onto the stack. With poprr it's in reverse. (That's what I get from this at least)
Fixed. Thanks!
My solution passes every test I can come up with, including tests for special characters and empty Strings, yet it still fails finalSearchTestRareCases and finalSearchTestNonChar. I wish the instructions gave some indication of what cases are covered by those tests.
Thanks. I corrected.
Loading more items...