about | help | code help+videos | done | prefs |
Write a method that compares the 'first' few characters of two strings. If the strings match for those 'first' characters, return those matching characters. Otherwise return a string that says "no match". Note that 'first' will always be a positive integer smaller than the length of the shortest string. bbb1same(7, "This is a test", "This is not a test") → "This is" bbb1same(3, "What?", "Just happened?") → "no match" bbb1same(3, "this", "that") → "no match" ...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: 190
Copyright Nick Parlante 2017 - privacy