当前位置:网站首页>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!
边栏推荐
猜你喜欢
随机推荐
Likou Brush Question Record 4.1-----209. The sub-array with the smallest length
科大讯飞笔试题复盘
Apache站点下载大文件自动中断或者文件不完整
全志通过fastboot烧写boot.img
最近看到很多人想自学或者报班但是不清楚如何选择,我今天就和大家说说
VS2019编译boost_1_79,生成32位和64位静态库
My thoughts on software development
YOLOV1详解——Pytorch版
Composer usage record
高性能 MySQL(十二):分区表
2022/8/8 Competition thinking + state pressure dp
接口的安全性测试,应该从哪些方面入手?
全文翻译:Multimodal Neural Networks: RGB-D for Segmantic Segmentation and Object Detection
如何最大限度地减少企业受到供应链攻击的风险
Working subtotal rtcp length and network byte order
独立机器连接cdh的spark集群,远程提交任务(绝对可以成功,亲测了n遍)
313. 超级丑数-暴力解法
<爆>2022中文版-《海外博士申请指南-材料准备、时间线、套磁、面试及录取》免费分享
工作小计 rtcp的length和网络字节序
ROS2错误:不支持OpenGL 1.5 GLRenderSystem:: ci initialiseContext在C: \ \ ws \构建……









