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.
This comment is hidden because it contains spoiler information about the solution
The random tests for the Shell implementation appears to occasionally add extra spaces to the output.
Encoded message:
tvg3swhprr hj,
My bash script works, but it is not efficient enough to finish within 12000 ms. I made my best attempt at translating my completed Python solution to bash, but unfortunately, the bash version is too slow. Any suggestions for improving efficiency in bash? I am using associative arrays to convert between letters and their decimal equivalent. Is there a better/faster way to do that in bash? Also I am using
bc
to handle most mathematical calculations.Thank your for the assistance. I was able to complete this kata. I believe my original issue was caused my use of addition
echo
commands (used for testing/debugging) prior to the finalecho
output. Once these commands were commented out, the logging recieved the correct values.Is
echo
the proper way to return an output of a function in Bash? In my Bash script, I am storing the number of iterations ascounter
. My script finishes withecho $counter
and the value printed to the console matches the expected output, but the the testing script says that it got 0.Wow that is embarassing. Thank you for pointing out my error. I was certain that I had counted all 15 requests in my solution. I am ashamed of myself.
I appreciate your patience with my ignorance. I solved the above example by hand and came out with the exact same taxis as above:
How are these not "distributed" correctly?
I listed the six taxis above. The number of requests is small enough that it can be checked by hand, and while I may have missed something, I do not see any mistake. All 15 requests are satisfied with the six taxis that are show in my post.
My code passes the basic tests and most of the small random tests, but on some tests it says I am off by one taxi. In the example below, it says there should be 7 taxis. I don't see how they are getting 7 taxis. What am I missing here?