Ad
  • Custom User Avatar

    I find the instructions very confusing. After experimenting with your test cases it seems like you are asking the user to find the smallest and largest string lengths in each array. If the smallest length is in the first array, subtract the largest length from the second array and return the absolute value. Otherwise take the largest length from the first array and subtract the smallest length from the second array and, again, return the absolute value.

    Is this correct?

    Edit:
    It seems some of the random tests (in Javascript) are wrong. The instructions say if either arrays are empty it should return -1. When I log the arguments provided I see several tests with empty arrays. My code returns -1 in all cases but the tests are expecting a postive numerical result.

    Example:

    [ 'ttffdddooo',
    'bbbtttthhhnnnny',
    'hhkkkww',
    'jlllh',
    'jjccccaaaazzzztttqqqwwqqqq' ] []
    It should work for random tests too - Expected: 26, instead got: -1```
    
    In the above copy/paste, the answer should be `-1` since the second array provided is empty, yet the test is expecting the answer to be `26`.
    
  • Custom User Avatar

    Seems correct but s1 and s2 are not strings they are String[].

  • Custom User Avatar

    Have a question in first test(java) is length of s1 = 69 and length of s12 = 38?