about | help | code help+videos | done | prefs |
APCS String 1, Problem 8. Given a string, if a length 2 substring appears at both its beginning and end, return a string without the substring at the beginning, so "HelloHe" yields "lloHe". The substring may overlap with itself, so "Hi" yields "". Otherwise, return the original string unchanged. S18_without2("HelloHe") → "lloHe" S18_without2("HelloHi") → "HelloHi" S18_without2("Hi") → "" ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 100
Copyright Nick Parlante 2017 - privacy