当前位置:网站首页>Huawei 2020 school recruitment written test programming questions read this article is enough (Part 2)
Huawei 2020 school recruitment written test programming questions read this article is enough (Part 2)
2022-07-29 05:49:00 【Quantify NPC】
background
Continue with the background of the previous article , Keep looking. , First, send out another copy of the outline .

dried food ( Advanced part )
1. Advanced data structure concept , Basic operation , And advantages and disadvantages, etc
1.1 Binary search tree
Simple questions
Medium question
- ( Middle order traversal of binary trees )
- ( Impassable binary search tree )
- ( Binary search book iterator )
- ( From binary search book to bigger and tree )
1.2 Pile up
Simple questions
Medium question
- ( Sort the characters according to their frequency of occurrence )
- ( front K High frequency words )
- ( Refactoring strings )
1.3 graph theory
Simple questions
Medium question
2. Common algorithms and ideas
2.1 Sorting algorithm ( Fast 、 Insert 、 Heap sort, etc )
Simple questions
Medium question
2.2 iteration 、 The idea of recursion
Simple questions
Medium question
2.3 The idea of partition ( Such as : Two points search 、 Merge, sort, etc )
Simple questions
Medium question
2.4 search algorithm ( depth , Breadth )
Simple questions
Medium question
2.5 Greedy Algorithm
Simple questions
Medium question
2.5 Dynamic programming ( knapsack 0-1 difficulty )
Simple questions
Medium question
appendix : Blood spitting notes
Using data structures and algorithms
data structure : character string 、 Array 、 Stack 、 queue ( Including priority queues 、 deque )、 Linked list 、 Hashtable 、Set、 Binary tree . Priority queues can be used to solve the smallest and largest problems , I'm still a little dizzy about the adjustment of the heap .
Algorithm : In front of the binary tree / in / In the following order / Level traversal ; Of Graphs BFS、DFS、 Shortest path algorithm 、 Minimum spanning tree ; to flash back 、 recursive 、 Dynamic planning, etc . The basic data structure of sorting algorithm has ready-made wheels , Just understand the principle .
The focus here is on the official examination scope .
about JAVA, Focus on the characteristics of several commonly used collection classes ( Is it orderly 、 What order 、 Is repetition allowed ), In the process of solving problems, you can immediately think of which data structure a feature needs 、 Which class library .

Typical problem solving ideas summarized in the process of problem brushing ( Continuous brushing , If you have experience, please detour )
1. Sliding window
Sliding window is a double pointer problem solving idea , use left、right Left and right hands , Represents the leftmost and rightmost ends of a sliding window ( initialization left = right = 0). The left and right hands move in turn , Window size increases and decreases ( The window size can be fixed or dynamic , According to the title requirements ), The window keeps sliding to the right , Finally, the best solution of the problem can be obtained in linear time . Sometimes topics need to be supplemented by HashMap、 Array to determine the existence 、 The feasibility of .
Recommended articles : The sliding window
2. Linked list
The most basic operation of linked list : establish 、 Insert 、 Deletion is a must .
The commonly used problem-solving method is mainly using the fast and slow pointer ( Only the lookup operation is involved )、 Add auxiliary head node ( It involves adding, deleting and modifying ), On this basis, how to judge whether the linked list has links and entry points 、 Intermediate nodes 、 Reciprocal K It is recommended to master the skills of solving problems . List questions must be drawn on white paper , Draw and write .
Recommended articles : Linked list
3. Pictures
Recommend programmer Xiaohui 2019 Several posts about pictures in , It's very easy to understand 
4. Binary tree
Binary tree feels no skill , It's good to have solid basic skills . The focus is on the front / in / In the following order / Sequence traversal ,LeetCode There will be some variants based on these , such as Z Font printing , Foreword and middle order , Recover binary tree from middle order and post order traversal , The finger of the sword offer And Xiaohui have typical explanations .
5. Retrospective method
Backtracking algorithm is a search attempt process similar to enumeration , According to the depth first search strategy , Starting from the root node, we explore the solution space tree , When a node is explored , We should first judge whether the node contains the solution of the problem , If you include , We will continue to explore from this node ; If the node does not contain the solution of the problem , Just “ to flash back ” return , That is, go back and choose again , Try another path .
If we use the backtracking method to find all the solutions of the problem , Go back to the root , And all feasible subtrees of the root node have to be searched all over before the end . And if we use the backtracking method to find any solution , As long as you find a solution to the problem, you can end it .
Adapt to the question type : Complete permutation and combination
Templates : I saw LeetCode There is a good template in , To be added .
6. Dynamic planning
Dynamic planning means that the next state can be based on the previous state , Or a reasoning process obtained from previous states . You can see the detailed dynamic planning —— Zou Bo talked about Dynamic Planning , It talks about the path 、 COINS 、 The longest subsequence .
Although I have been tested many times , I made seven or eight strokes , It is always dizzy to reason the state transition equation by yourself –#, Fortunately DP The problem that can be solved , There are other wheels that can be solved .
7. Bit operation
Bit operation is very basic , Typical bit operation skills and Applications , But they are seldom used in daily work , Wen guxia : An operation
边栏推荐
- QT layout management -- Part stretch principle and sizepolicy
- Novice introduction: download from PHP environment to thinkphp6 framework by hand
- 新手入门:手把手从PHP环境到ThinkPHP6框架下载
- 中海油集团,桌面云&网盘存储系统应用案例
- 与多家机构战略合作,背后彰显PlatoFarm元宇宙龙头的实力
- 量化开发必掌握的30个知识点【什么是Level-2数据】
- PHP如何生成二维码?
- iSCSI vs iSER vs NVMe-TCP vs NVMe-RDMA
- 超简单集成HMS ML Kit 人脸检测实现可爱贴纸
- Some opportunities for young people in rural brand building
猜你喜欢

农村品牌建设给年轻人的一些机会

量化开发必掌握的30个知识点【什么是分笔逐笔数据】?

DAY4:SQL Sever 简单使用

如何零代码制作深度学习的趣味app(适合新手)

Sliding switch of tab of uniapp component

Okaleido Tiger 7.27日登录Binance NFT,首轮已获不俗成绩

Fantom (FTM) 在 FOMC会议之前飙升 45%

Refresh, swagger UI theme changes

Extreme deflation and perpetual motion machine model will promote the outbreak of platofarm

QFrame类学习笔记
随机推荐
D3.JS 纵向关系图(加箭头,连接线文字描述)
农村品牌建设给年轻人的一些机会
QFrame类学习笔记
Starfish OS: create a new paradigm of the meta universe with reality as the link
Okaleido Tiger 7.27日登录Binance NFT,首轮已获不俗成绩
超简单集成HMS ML Kit 实现parental control
Countdown of the uniapp component (such as the countdown to reading the agreement and the countdown to completing learning)
Under the bear market of encrypted assets, platofarm's strategy can still obtain stable income
Reporting Service 2016 自定义身份验证
dcat 批量操作弹窗及参数传递
运动健康深入人心,MOVE PROTOCOL引领品质生活
"Shandong University mobile Internet development technology teaching website construction" project training log I
“山东大学移动互联网开发技术教学网站建设”项目实训日志四
打印出1-100之间的所有质数
JDBC连接数据库详细步骤
“山东大学移动互联网开发技术教学网站建设”项目实训日志二
DAY6:利用 PHP 编写登陆页面
Plato farm is expected to further expand its ecosystem through elephant swap
闪贷Dapp的调研及实现
Masscan tutorial