首页
题库
面试
求职
学习
竞赛
More+
所有博客
搜索面经/职位/试题/公司
搜索
我要招人
去企业版
登录 / 注册
首页
>
试题广场
>
词频统计
[编程题]词频统计
热度指数:7743
时间限制:C/C++ 3秒,其他语言6秒
空间限制:C/C++ 32M,其他语言64M
算法知识视频讲解
给定一个string数组
article
及其大小
n
及一个待统计单词
word
,请返回该单词在数组中出现的频数。文章的词数在1000以内。
马上挑战
算法知识视频讲解
提交运行
算法知识视频讲解
添加笔记
求解答(19)
邀请回答
收藏(58)
分享
纠错
提交结果有问题?
59个回答
4篇题解
开通博客
牛客823344108号
发表于 2024-07-17 20:28:01
#include <iostream> #include <vector> using namespace std; class Frequency { public: int getFrequency(vector<string>& artic
展开全文
一直在i
发表于 2020-10-20 10:18:50
import java.util.*; public class Frequency { public int getFrequency(String[] article, int n, String word) { // write code here int n
展开全文
果粒陈33
发表于 2022-06-20 15:31:15
# -*- coding:utf-8 -*- class Frequency: def getFrequency(self, article, n, word): # write code here n = 0 for s in articl
展开全文
mythwind
发表于 2022-04-07 11:21:34
简单 import java.util.*; public class Frequency { public int getFrequency(String[] article, int n, String word) { // write code here int num = 0; for (i
展开全文
问题信息
编程基础
字符串
哈希
难度:
59条回答
58收藏
22476浏览
热门推荐
通过挑战的用户
查看代码
Dreamin...
2023-02-24 18:34:08
KIKI&am...
2022-09-02 23:45:11
杨木呀
2022-08-30 16:29:30
uniquel1_
2022-08-27 18:34:11
牛客88214...
2022-08-26 18:41:42
相关试题
某指令流水线由5段组成,各段所需要...
阿里巴巴
编程基础
编译和体系结构
测试
后端开发
客户端开发
前端开发
数据
运维/技术支持
评论
(27)
如图 1 表示使用快表(页表)的虚...
编程基础
评论
(1)
对于我们来说,谁是好的顾客?
销售常识
评论
(1)
小红书用户在不同使用场景下,对内容...
需求分析
评论
(1)
订单表order_table全部记...
查找
数据库
数据分析
SQL
评论
(2)
词频统计
扫描二维码,关注牛客网
意见反馈
下载牛客APP,随时随地刷题
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 } }