Ad
  • Custom User Avatar

    In this kata you've got to minimize the total amount of the purchase price by buying different titles which correspond to different letters of the given array and applying the shown discounts.

  • Default User Avatar

    I have no clue what do these arrays mean, how to interprate them?\n
    ["F", "T", "H", "F", "T", "R"]
    any one can explain them more please?
    like how to know how many copies of which topic?

    thanks

  • Custom User Avatar

    Post your non working code: https://docs.codewars.com/training/troubleshooting#post-discourse so we can check what was wrong with it. match returns null when there is no match.

  • Default User Avatar

    yeah I solved it, I just wanted to know how did it fail regex trap

  • Custom User Avatar

    The instructions are fine, what more do you need?

    Consonants are all letters used to write English excluding the vowels a, e, i, o, u.

    Numbers and special characters are not consonants.

  • Default User Avatar

    well, the instruciton should be more clear, it has some imbiguty when it comes to numbers and special characters,

    it's always failing regex trap I don't know why,

    although when i take the regext trap text "0123456789_" and match it with my regex, it shows "null"

    please do improve the description little bit more, I thought it will be a 2 minutes kata, now it's taking more that 1.5 hours

  • Default User Avatar

    🤣🤣🤣🤣🤣
    wow, vim works in commets too Lol

  • Default User Avatar

    I really tried very hard to solve it this way, store the indecies of spaces in one array, then store the indecies of first letter of each word in an other array,
    but i couldn't proceed forward with linking the two arrays after storing values,
    slute to you for compeleting it this way