about | help | code help+videos | done | prefs |
Write a method that returns the number of times 'code' appears as part of any of the strings in an array of strings. The string 'code' may appear multiple times in some of the strings, but you are only counting how many strings 'code' appears in, NOT how many times it appears in each string. So count 'code' ONCE as appearing in a string no matter how many times it appears in that string. The only string methods you are allowed to use are: .length, .substring, and .equals. ppp2hasCode("gni", []) → 0 ppp2hasCode("ing", ["testing", "bling", "sing", "inginging", "bob"]) → 4 ppp2hasCode("dog", ["endogenous", "secundogeniture", "outstanding", "doggerel"]) → 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: 330
Copyright Nick Parlante 2017 - privacy