about | help | code help+videos | done | prefs |
countAxA
Given a string and two letters (c1 and c2), return a count of the number of times "axb" occurs in the string, where x is any character. For example, given the string "antiaircraft" and the letters 'a' and 't', your method should return 2. The three-letter patterns may overlap. For example, "aaaa" has two occurrences of "axa". countAxA("antiaircraft", "a", "t") → 2 countAxA("bearberry", "e", "r") → 2 countAxA("aaaa", "a", "a") → 2 ...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: 200
Copyright Nick Parlante 2017 - privacy