Ad
  • Custom User Avatar

    I have a question.

    For the example "HEY JUDE", the method decodeBits() should return "···· · −·−− ·−−− ··− −·· ·"?

    If I put
    public static String decodeBits(String bits) {
    return "....";
    }
    and then run the test, the message is "Expected: is "HEY JUDE" but: was "H""

    If I put
    public static String decodeBits(String bits) {
    return "···· · −·−− ·−−− ··− −·· ·";
    }
    and then run the test, the message is "Expected: is "HEY JUDE" but: was "null""

    But i see that the tests call both MorseCodeDecoder.decodeMorse AND MorseCodeDecoder.decodeBits

    Thanks.

  • Custom User Avatar

    Look at the follow example:
    [25,25,50,25,25,100,50]

    When the bag was equal = 125, in the line they remain [...,100,50]

    If to the person of 100dollars you give them 1bill-50dollars and 1bill-25dollars, you can given back to the last person
    But if to the person of 100dollars you give them 3bill-25dollars, you can't given back to the last person

    In conclusion, the priority of bills to give back was not defined

  • Custom User Avatar

    Sorry.

    Look at the follow example:
    [25,25,50,25,25,100,50]

    Following your opinion... when the bag was equal = 125, in the line they remain [...,100,50]

    If to the person of 100dollars you give them 1bill-50dollars and 1bill-25dollars, you can given back to the last person
    But if to the person of 100dollars you give them 3bill-25dollars, you can't given back to the last person

    In conclusion, the priority of bills to give back was not defined

  • Custom User Avatar

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