6 kyu

We are the Robots d[(0)(0)]b

99 of 316user8476848
Description
Loading description...
Algorithms
Data Structures
Regular Expressions
Puzzles
Strings
  • Please sign in or sign up to leave a comment.
  • Goudron Avatar

    Description says that legs are "abcdefghijklmnopqrstuvwxyz", when they can also be in the upper case.

  • FrostIB Avatar

    Why is it 3 automatik and 0 mechanik if this 'm><0(;0[;a' corresponds to the given conditions? a = ["d*(0)(0)}b We're functioning d>[0;;0&&f automatik D[(0)(0)]b", 'and m><0(;0[;a we dancing are Mechanic']; assert.deepEqual(countRobots(a), ["3 robots functioning automatik", "0 robots dancing mechanik"]);

  • ejini战神 Avatar

    Tests in Crystal && Ruby violate this criteria--> Case insensitve count of robots in string with "automatik" or "mechanik"

  • ElectricZatch Avatar

    Neat kata! This certainly makes learning regex much more interesting!!

  • ejini战神 Avatar

    The initial solution for ruby and crystal are wrong

  • ejini战神 Avatar

    Nice kata ~~ ^^

  • wthit56 Avatar

    I'm finding this very difficult to understand, unfortunately. It might be the way it's told in terms of the "story." I just need to know: What is the expected input? What is the expected output? What constitutes a valid robot?

  • dinglemouse Avatar

    Hi @rollietikes, even your own Java solution fails if there are 2 adjacent robots and no space between them!

    For example d[(0)(0)]Bd[(0)(0}]B

    The Kata description doesn't disallow this scenario.

    Maybe need more test cases?

    :-)

  • Prygoon Avatar

    With this kata, I began to understand RegEx. Thanks for a fun and challenge.

  • user5036852 Avatar

    I hate RegEx!! So: Good challenging kata! ;-) Thanks!

  • arlimus Avatar

    Just a small misunderstanding I ran into:

    Case insensitve count of robots in string with "automatik" & count of robots in string with "mechanik".
    

    I initially separated a case-insensitive count for Automatik vs case-sensitive count for Mechanik because of the way it was written (doing case-check on the robot's legs!).

    Overall thank you, this was a fun exercise :)

  • JohanWiltink Avatar

    This comment has been hidden.

  • St3f4n Avatar

    In js one example test case is wrong. The third one from the bottom expects 3 automatik 3 mechanik but it should be 2 - 3. Final tests are fine :)

  • mmalkavian Avatar

    This comment has been hidden.

  • kazk Avatar
    - body any of the following => |};&#[]/><()
    + body any of the following => |};&#[]/><()*
    

    d*(0)(0)}b

  • Blind4Basics Avatar

    Hi,

    You could make the identification of the robots a bit harder/clearer, maybe. It would be interesting to have less regexp allowed to work. Or not... ;-)

    for example, tests with der0)(0))b wich is not a robot, and so on.

  • Joz Avatar

    it was rather unclear with pattern =)