题解 | #词频统计#
词频统计
http://www.nowcoder.com/practice/ebff2814640a48fdb0d9690677f7c7de
简单
import java.util.*;
public class Frequency { public int getFrequency(String[] article, int n, String word) { // write code here int num = 0; for (int i = 0 ; i < n ; i ++) { if(article[i].equals(word)) { num += 1; } } return num; } }