about | help | code help+videos | done | prefs |
Write a method that returns the input parameter string, but with the first and last characters swapped. Look at the test data for examples. As a precondition, you may assume that the input parameter string has at least two characters. test2020_10_01_P1SLHL_swapLetters("welcome") → "eelcomw" test2020_10_01_P1SLHL_swapLetters("Xa") → "aX" test2020_10_01_P1SLHL_swapLetters("Fast programming is not always good programming.") → ".ast programming is not always good programmingF" ...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: 250
Copyright Nick Parlante 2017 - privacy