about | help | code help+videos | done | prefs |
Write a method that evaluates the "front-back" symmetry of a string up to matchLen letters from the front and back of the string. Return 'true' if the string is symmetric up to matchLen letters. Return false if matchLen is greater than half the string length, or if the letters don't match. For example, the string "racecar" will return true with a matchLen of 0, 1, 2, or 3, but not higher because a higher matchLen would be more than half the length of the string. nov9_2015_SLHL_matchMany("racecar", 3) → true nov9_2015_SLHL_matchMany("amanaplanacanalpanama", 5) → true nov9_2015_SLHL_matchMany("amanaplanacanalpanama", 15) → false ...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: 280
Copyright Nick Parlante 2017 - privacy