Java is the future !: missingChar

Saturday, October 9, 2010


You've given a non-empty string and an integer, return a new string where the char at index "n" has been removed. The value of "n" will be a valid index of a char in the original string (i.e. n will be in the range 0..str.length()-1 inclusive).

missingChar("kitten", 1) → "ktten"
missingChar("kitten", 0) → "itten"
missingChar("kitten", 4) → "kittn"

Solution :

No comments:

Post a Comment