Ad
  • Default User Avatar

    First try to bf the result for 10/100/1000/10000/100000. Then analyse each and every result and find out the connection between them. This is the way i've solve it but it took me 2-3 hours. No higher math or 'magic' formula is needed. Good Luck.

  • Custom User Avatar

    I feel like this kata is more about time complexity than it's about the problem solving, I solved it fairly easy to pass cases with small amount of numbers but can't figure out a solution that doesn't time out for the life of me. I've tried learning some about numpy to try to use vectoring but I'm struggling a lot. Anyone can let me know if I'm on the right track or am I looking in the wrong place. Thank you!

  • Custom User Avatar

    My mistake , Thanks a lot bro

  • Default User Avatar

    Just looking by eye, can't you see that there are 2 0 in first array and only 1 0 in second array? So it should return False.

    The kata has been solved 70,000+ times, the tests are almost surely fine by now.

  • Custom User Avatar

    I am using javaScript , look to this test
    [9, 0, 6, 0, 1, 2, 5, 10, 9, 7, 4] , [100, 49, 1, 81, 81, 4, 0, 36, 25, 1, 16]
    According to the question, this test is supposed to return true
    But instead it returns false ..
    My code passed more than 208 Test !

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    which language are you using?

    if you say that tests are not accurate, you need to provide an example of why they are not ;)

  • Custom User Avatar

    you can log the input to the console using the print function

  • Custom User Avatar

    I think the tests are not accurate

  • Custom User Avatar

    Passing all tests including 100 out of 100 randoms except fixed test number 10 in python. Any way to access the information with the fixed tests so I can debug and see why that one test is failing? or is there something up with that test in particular.

  • Default User Avatar

    It's an array of a single character which holds the amount of vowels.

    For some reason.

    God knows why they didn't just give a variable but you know, it doesn't matter.

  • Custom User Avatar

    How would not having a loop account for different input?

  • Custom User Avatar

    you're probably printing the answer instead of returning it

    Actual: "() - " Expected: "(123) 456-7890"

    means that your function returned "() - " when the answer is "(123) 456-7890"

  • Custom User Avatar

    I'm getting error
    Actual: "() - "
    Expected: "(123) 456-7890"
    but when put into a codespace on github and adding a print statement i get the expected answer returned.

  • Custom User Avatar

    nb_vowels is the number of vowels. You need to report the number of vowels into it.

  • Loading more items...