Ad
  • Custom User Avatar

    what do i have to actually do in this code

    You can't ask for other people to give away the solution, you know? The task is to guess what the next Math::random call is going to return - how this can be done is for you figure out.

  • Default User Avatar

    same here

  • Custom User Avatar

    passing an empty string will return an empty string

    If your solution doesn't work for empty strings, that's your problem. Not an issue.

  • Default User Avatar

    In java when i use String.charAt(0) function it says this:String index out of range:0.
    i have solved the encode correctly but cannot run it because of this issue.

  • Default User Avatar

    Can someone explain what do i have to actually do in this code to match the output

  • Custom User Avatar

    don't forget the size of the problem here: 4x4 is super tiny.

  • Default User Avatar

    Nice Kata! :D
    ...I think my lazy [Python] soluton is probably "The Most BARBARIC (/horrific) ever made :S" ... But it actually DID work :D
    ...And surprisingly "fast", actually, to my biggest surprise! O_o

  • Default User Avatar
  • Custom User Avatar

    Your code may be correct but is too slow to pass the whole tests. That's what indicates a time out (unless your code gets lost in an infinite loop).

  • Default User Avatar

    I am working in Java. Have run some standard tests(basic output for what was written in the assert part) in other idles where i am getting nth Hammming number perfectly.
    The test part of the codewars is getting the green light but when I attempt the solution, its say time out. Can't really understand where the problem has risen.
    My code is perfectly logical and correct.

  • Custom User Avatar

    You cannot run attempt tests in other idles. They are partially random. This kata requires some performance optimization, it's part of the challenge. It's impossible to help you without knowing more, we don't even know which language you're using.

  • Default User Avatar

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

  • Default User Avatar

    Just print peopleInLine to see the inputed test.

    I had problems with that test as well. Printing the input helped me realise I had misunderstood the requirement.

  • Default User Avatar

    What is the value inputed in test 6???
    All the other tests went well but 6.
    I want to know the input to get the correct output and check if i am wrong or you have made a mistake.

  • Default User Avatar

    i did the same but it showed error

  • Loading more items...