about | help | code help+videos | done | prefs |
Write a method the compares an array of single-character strings 'ltrs' to a single string with multiple characters 'str'. Count how many times the same character appears in the same position in the array and the string. As a precondition you may assume that the length of the array will match the length of the string. Look at the test data for examples. todays_2021_11_03_APSLHL_match(["a", "k", "i", "l", "l", "e", "r", "r", "a", "b", "b", "i", "t"], "akillerrabbit") → 13 todays_2021_11_03_APSLHL_match(["i", "l", "l", "e", "r", "r", "a", "b", "b", "i", "t", "a", "k"], "akillerrabbit") → 0 todays_2021_11_03_APSLHL_match(["k", "i", "l", "l", "e", "r", "r", "a", "b", "b", "i", "t", "a"], "akillerrabbit") → 3 ...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: 240
Copyright Nick Parlante 2017 - privacy