Ad
  • Custom User Avatar

    It would be really nice way to ban cheaters. Put something useless in your code and everyone who just copies it should be banned.

  • Custom User Avatar

    You should print the inputs to see--> https://docs.codewars.com/training/troubleshooting

  • Custom User Avatar

    These two lines add an index for faster regex matching, look up pg_trgm in the docs for more details. It works with provided dataset but there is a downside for searching like this. For example, if a prospect named Annabelle Smith exists and I need to find Anna Smith then the query will return a false positive.

  • Custom User Avatar

    the problem is that all comments appear in the dashboard of any user. ;)

  • Custom User Avatar
  • Custom User Avatar

    Hi,

    Not an issue, a question. Generic message below, for some context:


    Seems you're "rather new" to cw, so here are some general guidelines about the comments:

    • Issue: problem in the kata itself (description, wrong tests, wrong internal solution...)
    • Suggestions: well, I guess that part is clear
    • Question anything else that is related to you having a problem solving a kata -> that's you, currently.

    When you post issues:

    • provide ALL the useful information:
      • language
      • input
      • outputs (actual expected) when relevant
      • error message when relevant
    • check, DOUBLE check that this IS an issue, meaning that the problem is in the kata itself and not in your code. If it's in your code, post rather a question
    • if you pass this step, you still have to prove/explain what the issue is (and if you can provide fixes, it's even better)

    When you post a question: well, most of the above apply too x)

    When you post code, use proper github markdown, so that it's readable.


    So, seems you're doing java. Your problem is that you trim the spaces "everywhere" while you should do it at some specific places (edit: careful about the rules for new lines)

    I'd urge you to actually print to the console a representation of the actual string, and not just the string itself, so that you see the different kind of space characters. => s.replace(" ",".").replace("\n"," \\n"), for example.

    closing & cheers

  • Custom User Avatar

    True, it's not necessary. Not sure why I did that.

  • Default User Avatar

    well people do way better than me but appreciate it

  • Default User Avatar

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

  • Custom User Avatar

    Your functions should return in Codewars, not print the results.

  • Custom User Avatar

    Not a kata issue, use question when it's a problem with your code. Also read about using proper markdown so your code doesn't lose indentation amongst another things. In CW your functions should return the result, not print it, so store the string in a var and return it at the end instead of calling your function again (that's why it never stops, you're using recursion like that and it never ends).

  • Custom User Avatar

    Yes, if you mark your post as having spoiler content it will only be visible to people that has already solved the kata.
    Also, read what this thread is about, it has nothing to do with a problem with your code for a specific kata.

  • Custom User Avatar

    Please, don't paste code here, it can't be marked as having spoiler content, use the kata discussion for that.