Solve: nTwice
Imported By: Geoffrey Challen
/ Version: 2021.6.0
Given a String
and an int
n, return a string made of the first and last n chars from the String
. The String
length will be at least n.
For this problem we're expecting only a method.
Don't define a class, include modifiers like static or public, add import statements, or add code outside the method declaration.String nTwice(String input, int n) {
return "";
}