about | help | code help+videos | done | prefs |
makeInWord
Given an "in" string length 4, such as "<<>>", and a word, return a new string where the "in" String is in the middle of the word, e.g. "wo<<>>rd". We'll say that length()/2 is the middle of the word whether or not the length is even. Note: use str.substring(i, j) to extract the String starting at index i and going up to but not including index j. makeInWord("<<>>", "Yay") → "Y<<>>ay" makeInWord("<<>>", "WooHoo") → "Woo<<>>Hoo" makeInWord("[[]]", "word") → "wo[[]]rd" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy