about | help | code help+videos | done | prefs |
LASA_borderDigits
Provided two arguments, seq (a sequence of digits 0-9) and sub (a sub-sequence of digits 0-9), return a new sequence containing every digit, in order, that comes immediately before or after every appearance of sub in seq. If a digit is shared by two appearances, it should be included twice in the output. Appearances may be at the beginning and/or end of seq, in which case only existing digits should be included. Assume that sub.length() > 0 and that there are no overlapping appearances. LASA_borderDigits("12345", "34") → "25" LASA_borderDigits("05675670", "567") → "0570" LASA_borderDigits("12121", "1") → "2222" ...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