about | help | code help+videos | done | prefs |
APCS String 1, Problem 5. Given a string of any length, return a new string where the last 2 chars, if present, are swapped, so "coding" yields "codign". S15_lastTwo("coding") → "codign" S15_lastTwo("cat") → "cta" S15_lastTwo("ab") → "ba" ...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