Ad
  • Custom User Avatar

    Your code is returning

    J
    K
    D
     
     
    W
    B
    I
    R
    A
    Q
    K
    F
     
     
    Y
    E
     
    W
    V
    

    and the expected solution is

    J
    K
    D
     
    W
    B
    I
    R
    A
    Q
    K
    F
     
    Y
    E
     
    W
    V
    

    You are only replacing the substring with exactly 3 spaces instead of multiple. That means it will not replace any whitespace with more than 3 characters. You need to deal with multiple not 3.

  • Custom User Avatar

    Hmm weird. Post code and I'll check for you.