Ad
  • Custom User Avatar

    i got the same error my friend, i didn't face any problem when i wrote the same algorithm in javascript

  • Custom User Avatar

    Ah, you're right, sorry! I just ran the whole code.
    You can try different approaches to improve the performance. Maybe something like building the entire field and then replacing only the right indexes of each row with the other symbol.
    Or use only one for loop to build the different lines :)

  • Custom User Avatar

    This is not an issue with the kata. You need to improve the performance of your code. You use a for loop in a for loop, therefore it's not really efficient. Also, your output seems to be wrong, as the X is printed two times.