当前位置:网站首页>iFLYTEK Written Exam Questions Review
iFLYTEK Written Exam Questions Review
2022-08-09 02:40:00 【Strawberry Shake Shake-】
Question 1: Given a string with some words separated by an indeterminate number of spaces, count the number of words containing the character e;
This is relatively simple and will not be solved;
The second question, given four points, calculate the corresponding convex quadrilateral area, the point is the given structure;
I didn't write it down: I can't make this basic test math formula if I don't know it, and it has no reference value, so I won't review it;
The third question, given a string, find the number of iflytek in the subsequence of the string
This is also not written, g, the backtracking template is not written correctly!!!
backtracking(str, i + 1); not backtracking(startIndex + 1);
Violent backtracking:
#include using namespace std;string target = "iflytek";string path;int res = 0;bool isPath(string& path) {for (int i = 0; i < path. size(); ++i) {if (path[i] != target[i]) return false;}return true;}void backtracking(const string& str, int startIndex) {if (!isPath(path)) return;if (path == target) {res++;return;}for (int i = startIndex; i < str.size(); ++i) {path.push_back(str[i]);backtracking(str, i + 1);path.pop_back();}}int findiflytek(string& str) {backtracking(str, 0);return res;}int main() {string str = "iflytekiflytek";cout << findiflytek(str) << endl;return 0;} Dynamic programming solution: to see!
边栏推荐
猜你喜欢
![[ANT]apache ant 安装说明](/img/65/9ed0052d0f950b4dad0fc3430b7271.png)
[ANT]apache ant 安装说明

【Redis】主从复制的核心原理

最强分布式锁工具:Redisson

Force buckled brush problem record 7.1 -- -- -- -- -- 707. The design list

独立机器连接cdh的spark集群,远程提交任务(绝对可以成功,亲测了n遍)

基于NLP的智能问答系统核心技术
![[Redis] The core principle of master-slave replication](/img/42/6b0f511d3bcf4b951b556408b021c4.png)
[Redis] The core principle of master-slave replication

Likou Brush Question Record 1.5-----367. Valid perfect squares

企业面临的五大数据安全挑战

高性能 MySQL(十二):分区表
随机推荐
JS 将对象拆开拼接成 URL
用DFS解决最终幻想13-2时钟谜题
What aspects should we start with for interface security testing?
物联网未来:未来五年的预期
Likou Brush Question Record 6.1-----203. Remove linked list elements
Jenkins configuration nail notification
2022 China Eye Expo, China Beijing International Children and Adolescent Eye Health Industry Exhibition
评估深度学习模型的指标:混淆矩阵、准确率、精确率和召回率
The most fierce "employee" in history, madly complaining about the billionaire boss Xiao Zha: So rich, he always wears the same clothes!
Postman接口测试【官网】最新版本 安装及使用入门教程
OJ:L3-021 神坛 伪解 排序后遍历
Json之JArray的使用方法
Open3D 点云曲率计算
Financial Industry Software Testing Interview Questions (with Answers) | Getting Started Guide
ROS2错误:不支持OpenGL 1.5 GLRenderSystem:: ci initialiseContext在C: \ \ ws \构建……
“蔚来杯“2022牛客暑期多校训练营7,签到题CFGJ
1160. 拼写单词
第二部分:和查找表相关的问题
金融行业软件测试面试题(含答案)| 入门指南
16.flink 自定义KeySelector