Ad
  • Custom User Avatar

    Assume that you creating string from 10 random characters.
    The chance of generating this string is 1 / 10 ** 6 = 0.000001 = 0.0001 %.
    So we have 3000 test cases. As you see, the chance of generating two exactly equal strings is less then 1 %.
    It will be better to make user use two functions: one to generate string and other to check if there is already such string and calling string generator untill new uniqeu string will be created.
    So you can simulate the string to validator function if the string already was.

  • Default User Avatar

    no longer

  • Default User Avatar

    is everything okay now?