2021年最新整理,5000道校招常用面试题,包含leetcode,校招笔试题,面试题,算法题,语法题。每天(周日休息)持续更新中。。。
205、(0235)lowest common ancestor of a binary search tree
214、(0297)serialize and deserialize binary tree
215、(0297)二叉树的序列化与反序列化 91
216、(0300)longest increasing subsequence
231、(0354)russian doll envelopes
235、(0380)常数时间插入、删除和获取随机元素
257、(0516)longest palindromic subsequence
261、(0543)diameter of binary tree
264、(0563)binary tree tilt
265、(0567)permutation in string
279、(0768)最多能完成排序的块 II 91
338、(1371)每个元音包含偶数次的最长子字符串
339、(1381)设计一个支持增量操作的栈 91
341、(1438)绝对差不超过限制的最长连续子数组
345、(1526)形成目标数组的子数组最少增加次数
346、(1558)得到目标数组的最少函数调用次数
347、(1574)删除最短的子数组使剩余数组有序
350、(1658)将 x 减到 0 的最小操作数
355、(1737)满足三条件之一需改变的最少字符数
361、(1883)准时抵达会议现场的最小跳过休息次数
362、(1899)合并若干三元组以形成目标三元组
88、const的作用有哪些,谈一谈你对const的理解?
89、描述char*、const char*、char* const、const char* const的区别?
91、static的作用是什么,什么情况下用到static?
95、inline 内联函数的特点有哪些?它的优缺点是什么?
99、知道条件变量吗?条件变量为什么要和锁配合使用?
100、如何用C 实现 C++ 的面向对象特性(封装、继承、多态)
103、extern有什么作用,extern C有什么作用?
25、虚拟内存是如何映射到物理内存的?了解分页内存管理吗?
26、什么是上下文切换,操作系统是怎么做的上下文切换?
27、什么是大端字节,什么是小端字节?如何转换字节序?
6、gcc hello.c 这行命令具体的执行过程,内部究竟做了什么?
3.as-if-serial规则和happens-before规则的区别
6.并发容器之CopyOnWriteArrayList详解
8.并发容器之ConcurrentHashMap详解(JDK1.8版本)与源码分析
10.ThreadLocal内存泄漏分析与解决方案
7、请你解释一下,内存中的栈(stack)、堆(heap) 和静态区(static area) 的用法。并且说明heap和stack有什么区别
2、(144) Binary Tree Preorder Traversal
3、(589) N-ary Tree Preorder Traversal
4、(94) Binary Tree Inorder Traversal
5、(145) Binary Tree Postorder Traversal
6、(590) N-ary Tree Postorder Traversal
9、(104) Maximum Depth of Binary Tree
10、(559) Maximum Depth of N-ary Tree
11、(111) Minimum Depth of Binary Tree
12、(105) Construct Binary Tree from Preorder and Inorder Traversal
13、(106) Construct Binary Tree from Inorder and Postorder Traversal
14、(889) Construct Binary Tree from Preorder and Postorder Traversal
15、(572) Subtree of Another Tree
16、(102) Binary Tree Level Order Traversal
17、(103) Binary Tree Zigzag Level Order Traversal
18、(107) Binary Tree Level Order Traversal II
19、(429) N-ary Tree Level Order Traversal
20、(637) Average of Levels in Binary Tree
21、(515) Find Largest Value in Each Tree Row
22、(987) Vertical Order Traversal of a Binary Tree
23、(257) Binary Tree Paths
24、(988) Smallest String Starting From Leaf
27、(297) Serialize and Deserialize Binary Tree
28、(110) Balanced Binary Tree
29、(108) Convert Sorted Array to Binary Search Tree
30、(235) Lowest Common Ancestor of a Binary Search Tree
31、(404) Sum of Left Leaves
32、(938) Range Sum of BST
33、(530) Minimum Absolute Difference in BST
34、(783) Minimum Distance Between BST Nodes
35、(538) Convert BST to Greater Tree
36、(958) Check Completeness of a Binary Tree
37、(543) Diameter of Binary Tree
38、(965) Univalued Binary Tree
39、(563) Binary Tree Tilt
40、(606) Construct String from Binary Tree
41、(617) Merge Two Binary Trees
42、(653) Two Sum IV - Input is a BST
43、(669) Trim a Binary Search Tree
44、(671) Second Minimum Node In a Binary Tree
45、(687) Longest Univalue Path
46、(700) Search in a Binary Search Tree
47、(872) Leaf-Similar Trees
48、(897) Increasing Order Search Tree
49、(993) Cousins in Binary Tree
50、(230) Kth Smallest Element in a BST
51、(98) Validate Binary Search Tree
52、(109) Convert Sorted List to Binary Search Tree
53、(1008) Construct Binary Search Tree from Preorder Traversal
54、(236) Lowest Common Ancestor of a Binary Tree
55、(654) Maximum Binary Tree
56、(513) Find Bottom Left Tree Value
57、(814) Binary Tree Pruning
58、(199) Binary Tree Right Side View
59、(662) Maximum Width of Binary Tree
60、(222) Count Complete Tree Nodes
61、(1022) Sum of Root To Leaf Binary Numbers
62、(1026) Maximum Difference Between Node and Ancestor
63、(1038) Binary Search Tree to Greater Sum Tree
64、(1080) Insufficient Nodes in Root to Leaf Paths
65、(1161) Maximum Level Sum of a Binary Tree
66、(1104) Path In Zigzag Labelled Binary Tree
67、(1110) Delete Nodes And Return Forest
68、(1123) Lowest Common Ancestor of Deepest Leaves
69、(1382) Balance a Binary Search Tree
70、(1372) Longest ZigZag Path in a Binary Tree
71、(1367) Linked List in Binary Tree
72、(124) Binary Tree Maximum Path Sum
73、(1443) Minimum Time to Collect All Apples in a Tree
74、(1339) Maximum Product of Splitted Binary Tree
75、(1315) Sum of Nodes with Even-Valued Grandparent
76、(1457) Pseudo-Palindromic Paths in a Binary Tree
77、(129) Sum Root to Leaf Numbers
78、(114) Flatten Binary Tree to Linked List
79、(450) Delete Node in a BST
80、(971) Flip Binary Tree To Match Preorder Traversal
81、(951) Flip Equivalent Binary Trees
82、(863) All Nodes Distance K in Binary Tree
83、(865) Smallest Subtree with all the Deepest Nodes
84、(1373) Maximum Sum BST in Binary Tree
85、(501) Find Mode in Binary Search Tree
86、(968) Binary Tree Cameras
87、(116) Populating Next Right Pointers in Each Node
88、(117) 填充每个节点的下一个右侧节点指针 II
89、(834) Sum of Distances in Tree]
90、(655) Print Binary Tree
91、(307) Range Sum Query - Mutable
92、(652) Find Duplicate Subtrees
93、(1028) Recover a Tree From Preorder Traversal
94、(NC45) 实现二叉树先序,中序和后序遍历
97、(NC102) 在二叉树中找到两个节点的最近公共祖先
102、(NC60) 判断一棵二叉树是否为搜索二叉树和完全二叉树
107、(NC9) 二叉树中是否存在节点和为指定值的路径
113、(NC98) 判断t1树中是否有与t2树拓扑结构完全相同的子树
116、(NC58) 找到搜索二叉树中两个错误的节点
1、(990) Satisfiability of Equality Equations
2、(997) Find the Town Judge
4、(1334) Find the City With the Smallest Number of Neighbors at a Threshold Distance
5、(1267) Count Servers that Communicate
6、(886) Possible Bipartition
8、(1462) Course Schedule IV
9、(1466) Reorder Routes to Make All Paths Lead to the City Zero
10、(1210) Minimum Moves to Reach Target with Rotations
11、(1202) Smallest String With Swaps
12、(787) Cheapest Flights Within K Stops
13、(332) Reconstruct Itinerary
14、(1519) Number of Nodes in the Sub-Tree With the Same Label
15、(478) Generate Random Point in a Circle
16、(1559) Detect Cycles in 2D Grid
17、(310) Minimum Height Trees
20、(1584) Min Cost to Connect All Points
21、(684) Redundant Connection
22、(685) Redundant Connection II
23、(743) Network Delay Time
26、(399) Evaluate Division
27、(1617) Count Subtrees With Max Distance Between Cities
28、(1284) Minimum Number of Flips to Convert Binary Matrix to Zero Matrix
29、(1293) Shortest Path in a Grid with Obstacles Elimination
30、(1298) Maximum Candies You Can Get from Boxes
32、(1391) Check if There is a Valid Path in a Grid
33、(1162) As Far from Land as Possible
34、(1091) Shortest Path in Binary Matrix
35、(1034) Coloring A Border
36、(1031) Number of Enclaves
37、(695) Max Area of Island
40、(1625) Lexicographically Smallest String After Applying Operations
41、(1627) Graph Connectivity With Threshold
42、(947) Most Stones Removed with Same Row or Column
43、(1654) Minimum Jumps to Reach Home
44、(1203) Sort Items by Groups Respecting Dependencies
45、(803) Bricks Falling When Hit
46、(1766) Tree of Coprimes
46-1、 找到每个节点的最小祖先,并且祖先节点和其节点值互质。
47、 (1368) Minimum Cost to Make at Least One Valid Path in a Grid
47-1、 修改箭头方向最少次数能够到达右下角的点。
48、(1786) Number of Restricted Paths From First to Last Node
48-1、 从头节点到尾节点的限制路径是多少个,限制路径指每次节点到尾节点的最短路径要递减。
49、(331) Verify Preorder Serialization of a Binary Tree
2、请问求第k大的数的方法以及各自的复杂度是怎样的,另外追问一下,当有相同元素时,还可以使用什么不同的方法求第k大的元素
7、对一千万个整数排序,整数范围在[-1000,1000]间,用什么排序最快?
1、(14) Longest Common Prefix
3、(921) Minimum Add to Make Parentheses Valid
4、(28) Implement strStr()
6、(443) String Compression
8、(680) Valid Palindrome II
9、(151) Reverse Words in a String
12、(438) Find All Anagrams in a String
13、(3) Longest Substring Without Repeating Characters
14、(387) First Unique Character in a String
15、(58) Length of Last Word
16、(205) Isomorphic Strings
18、(890) Find and Replace Pattern
19、(917) Reverse Only Letters
20、(345)Reverse Vowels of a String
22、(925) Long Pressed Name
23、(929) Unique Email Addresses
24、(409) Longest Palindrome
25、(434) Number of Segments in a String
28、(541) Reverse String II
29、(551) Student Attendance Record I
30、(557) Reverse Words in a String III
31、(657) Robot Return to Origin
32、(696) Count Binary Substrings
34、(771) Jewels and Stones
35、(784) Letter Case Permutation
38、(804) Unique Morse Code Words
39、(806) Number of Lines To Write String
40、(819) Most Common Word
41、(821) Shortest Distance to a Character
43、(844) Backspace String Compare
45、(893) Groups of Special-Equivalent Strings
46、(1003) Check If Word Is Valid After Substitutions
47、(17) Letter Combinations of a Phone Number
48、(1023) Binary String With Substrings Representing 1 To N
49、(482) License Key Formatting
50、(1071) Greatest Common Divisor of Strings
51、(1156) Swap For Longest Repeated Character Substring
52、(1106) Parsing A Boolean Expression
53、(1408) String Matching in an Array
54、(791) Custom Sort String
55、(678) Valid Parenthesis String
56、(1419) Minimum Number of Frogs Croaking
57、(1358) Number of Substrings Containing All Three Characters
58、(1309) Decrypt String from Alphabet to Integer Mapping
59、(1545) Find Kth Bit in Nth Binary String
60、(777) Swap Adjacent in LR String
61、(539) Minimum Time Difference
62、(459) Repeated Substring Pattern
63、(165) Compare Version Numbers
64、(1371) Find the Longest Substring Containing Vowels in Even Counts
65、(443) String Compression
66、(809) Expressive Words
67、(833) Find And Replace in String
70、(1638)Count Substrings That Differ by One Character
零声教育,专注于c/c++Linux后台服务器开发架构技术学习提升。
每天晚上8点【免费技术直播】:分享Linux,Nginx,ZeroMQ,MySQL,Redis,fastdfs,MongoDB,ZK,流媒体,CDN,P2P,K8S,Docker,TCP/IP,协程,DPDK等技术内容,立即学习。
2、免费订阅直播链接【添加WX: cz1625358265】即可领取对标腾讯T9职级技术要求的后台开发学习图谱。
微信扫码联系VIP课程咨询橙子老师,免费领取更多福利干货资料【备注:GitHub论文】