给定一个string数组article及其大小n及一个待统计单词word,请返回该单词在数组中出现的频数。文章的词数在1000以内。
加载中...
import java.util.*; public class Frequency { public int getFrequency(String[] article, int n, String word) { // write code here } }
class Frequency { public: int getFrequency(vector
article, int n, string word) { // write code here } };
# -*- coding:utf-8 -*- class Frequency: def getFrequency(self, article, n, word): # write code here
class Frequency { public int getFrequency(string[] article, int n, string word) { // write code here } }