当前位置:网站首页>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!
边栏推荐
- 概率模型校准
- 2022 Eye Health Brand Franchise Exhibition, Beijing Vision Care Exhibition, China Ophthalmology Technology Summit
- 接口自动化测试-接口封装思想
- 1261. 在受污染的二叉树中查找元素
- 如何最大限度地减少企业受到供应链攻击的风险
- Open3D 均匀采样
- [LeetCode305周赛] 6136. 算术三元组的数目,6139. 受限条件下可到达节点的数目,6137. 检查数组是否存在有效划分,6138. 最长理想子序列
- 金融行业软件测试面试题(含答案)| 入门指南
- Open3D 随机采样
- 为什么应用程序依赖关系映射对于云迁移至关重要
猜你喜欢
10.1-----19. Delete the Nth node from the bottom of the linked list
Programmer's Daily Life | Daily Fun
eladmin container deployment super detailed process
The building had been registry cluster, load balancing
终于有人把灰度发布架构设计讲明白了
接口自动化测试-接口封装思想
不会吧!不会吧!居然还有人不知道重绘以及回流
[TensorRT] 对UNet进行推理加速
xml引配置文件
第二部分:和查找表相关的问题
随机推荐
普通人如何增加收入
嵌入式设备驱动开发
OJ:L3-001 凑零钱 DFS
带你做接口测试从零到第一条用例 总结
全文翻译:Multimodal Neural Networks: RGB-D for Segmantic Segmentation and Object Detection
Financial Industry Software Testing Interview Questions (with Answers) | Getting Started Guide
OJ:L2-012 关于堆的判断
Inheritance
数字 07 verilog仿真实例
科大讯飞笔试题复盘
xml引配置文件
《独行月球》:独孤月的两次选择,让一个“中间人”成为大英雄
16.flink 自定义KeySelector
继承 Inheritance
9.1-----24. Swap the nodes in the linked list in pairs
目标检测中mAP计算以及源码解析
Flume (四) --------- Flume 企业开发案例
Jenkins environment deployment, (packaging, publishing, deployment, automated testing)
Pytest+request+Allure实现接口自动化框架
【无标题】