MCPcopy Create free account
hub / github.com/careercup/ctci / insertCharAt

Method insertCharAt

java/Chapter 9/Question9_5/Question.java:29–33  ·  view source on GitHub ↗
(String word, char c, int i)

Source from the content-addressed store, hash-verified

27 }
28
29 public static String insertCharAt(String word, char c, int i) {
30 String start = word.substring(0, i);
31 String end = word.substring(i);
32 return start + c + end;
33 }
34
35 public static void main(String[] args) {
36 ArrayList<String> list = getPerms("abcde");

Callers 1

getPermsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected