0

Hey hey ..I've got stucked onto another one ...

So, not sure how to explain this 1 but I can give an example ...

When input = 1 - expected result is a string = "a b c d e f g h i j k l m n o p q r s t u v w x y z"
When input - 2 - expected result is a string = "a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k l m n o p q r s t u v w x z"

Note - "y" is missing on the second expected result

What I have so far is :

public static String Puzzle(int t) {
         String s;
         String alp = "a b c d e f g h i j k l m n o p q r s t u v w x y z";
         s = new String(new char[t]).replace("\0",alp);
         return s;
    }

Well, it works for the first 1 but I am getting absolutely nowhere further one, any suggestions? :s

1
Contributor
1
Reply
11
Views
3 Years
Discussion Span
Last Post by Slavi
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.