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 agree that the description is not very clear. It took me a little while to make sense of it, but the task is:
You will receive an array of strings. Each string will contain either the word "automatik" or the word "mechanik", though not both. Each string may also contain "robots" represented by the default string "d[(0)(0)]b". The robots may have different appearances, however. The first and last part of the robot (the "legs"), which are "d" and "b" in the default robot, can be also be any other letter of the alphabet, both lowercase or uppercase. The other parts of the "body" of the robot, which are represented by square brackets ("[" and "]") and parentheses ("(" and ")") can be also be represented by any of the following symbols: |};&#[]/><()* . The "eyes", however, are always represented by zeros. You have to count the number of robots that appear in each string with the word "automatik" and the number of robots that appear in strings with the word "mechanik" and return the counts as an array of the form ["n robots functioning automatik", "m robots dancing mechanik"], where n and m represent the respective robot counts.
I hope that clears this up!
For those still confused, to truncate a number is to eliminate its decimal, without touching the base.
(If used alone,
truncate
meanstruncate to 0 decimals
, but you can actually truncate to the number of decimals you want)Examples:
.
raised as an issue
Reraised as issue
Nothing helps more than debuggers - follow the data step by step
Thanks man, I wouldn't have figured it out if it weren't for you. The description really needs a rework.
You can view inputs of test cases: https://docs.codewars.com/training/troubleshooting/#print-input
Oh, I didn't realize I'm using closure, lol.
Agree
Yeah, that caught me off guard. I totally didn't see that coming.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Loading more items...