preface
Bytedance is known to love algorithmic questions in interviews.
Leetcode’s official corporate question bank not only pays, but also has a large number of questions.
Therefore, I began to manually sort out the Leetcode algorithm problems involved in cow customer experience from July, 2000, and arranged them in order of frequency from highest to lowest. More than 250 high-frequency questions are listed below.
If you want to view the high frequency algorithm questions by department or post, or check the question banks of other big factories, you can use CodeTop: codetop.cc developed by me
Bytedance question bank has covered more than 20 departments, including Douyin, Feishu, Architecture, Data, commercial Real estate, Tongchedi, e-commerce and Toutiao.
Bytedance High Frequency Question (updated April 10, 2021)
The title | occurrences | link |
---|---|---|
3. The oldest string without repeating characters | 87 | Leetcode-cn.com/problems/lo… |
25. Flip linked lists in groups of K | 71 | Leetcode-cn.com/problems/re… |
206. Reverse linked lists | 70 | Leetcode-cn.com/problems/re… |
215. The KTH largest element in an array | 68 | Leetcode-cn.com/problems/kt… |
103. Zigzag level traversal of binary trees | 53 | Leetcode-cn.com/problems/bi… |
15. Sum of three numbers | 53 | Leetcode-cn.com/problems/3s… |
160. Intersecting linked lists | 53 | Leetcode-cn.com/problems/in… |
146. LRU caching mechanism | 51 | Leetcode-cn.com/problems/lr… |
121. The best time to buy and sell stocks | 47 | Leetcode-cn.com/problems/be… |
1. Sum of two numbers | 43 | Leetcode-cn.com/problems/tw… |
236. The most recent common ancestor of binary trees | 35 | Leetcode-cn.com/problems/lo… |
53. Maximum suborder sum | 34 | Leetcode-cn.com/problems/ma… |
415. String addition | 33 | Leetcode-cn.com/problems/ad… |
21. Merge two ordered lists | 32 | Leetcode-cn.com/problems/me… |
42. After the rain | 31 | Leetcode-cn.com/problems/tr… |
199. Right view of binary trees | 30 | Leetcode-cn.com/problems/bi… |
88. Merge two ordered arrays | 28 | Leetcode-cn.com/problems/me… |
141. Circular linked lists | 28 | Leetcode-cn.com/problems/li… |
33. Search rotation sort array | 28 | Leetcode-cn.com/problems/se… |
54. Spiral matrix | 28 | Leetcode-cn.com/problems/sp… |
102. Sequence traversal of binary trees | 26 | Leetcode-cn.com/problems/bi… |
20. Valid brackets | 26 | Leetcode-cn.com/problems/va… |
105. Construct a binary tree by traversing pre-order and middle-order sequences | 25 | Leetcode-cn.com/problems/co… |
200. Number of islands | 25 | Leetcode-cn.com/problems/nu… |
46. The whole arrangement | 23 | Leetcode-cn.com/problems/pe… |
142. Circular linked List II | 22 | Leetcode-cn.com/problems/li… |
56. Consolidated intervals | 22 | Leetcode-cn.com/problems/me… |
300. Longest ascending subsequence | 22 | Leetcode-cn.com/problems/lo… |
69. Square root of x | 22 | Leetcode-cn.com/problems/sq… |
232. Implement queues with stacks | 21 | Leetcode-cn.com/problems/im… |
124. Maximum path sum in binary trees | 21 | Leetcode-cn.com/problems/bi… |
Merge K sorted linked lists | 21 | Leetcode-cn.com/problems/me… |
5. The longest subroutine string | 21 | Leetcode-cn.com/problems/lo… |
Middle order traversal of binary trees | 20 | Leetcode-cn.com/problems/bi… |
155. The minimum stack | 20 | Leetcode-cn.com/problems/mi… |
143. Rearrange linked lists | 20 | Leetcode-cn.com/problems/re… |
41. Missing the first positive number | 19 | Leetcode-cn.com/problems/fi… |
101. Symmetric binary trees | 19 | Leetcode-cn.com/problems/sy… |
113. Sum of paths II | 19 | Leetcode-cn.com/problems/pa… |
958. Completeness testing of binary trees | 18 | Leetcode-cn.com/problems/ch… |
112. Sum of paths | 17 | Leetcode-cn.com/problems/pa… |
70. Climb the stairs | 17 | Leetcode-cn.com/problems/cl… |
169. Majority elements | 17 | Leetcode-cn.com/problems/ma… |
22. The k last node in the linked list | 17 | Leetcode-cn.com/problems/li… |
98. Validate binary search trees | 17 | Leetcode-cn.com/problems/va… |
39. Sum of combinations | 16 | Leetcode-cn.com/problems/co… |
1. Sort odd – even – down linked lists | 16 | Mp.weixin.qq.com/s/377FfqvpY… |
234. Palindrome linked list | 15 | Leetcode-cn.com/problems/pa… |
110. Balanced binary trees | 15 | Leetcode-cn.com/problems/ba… |
543. Diameter of binary tree | 15 | Leetcode-cn.com/problems/di… |
2. Add two numbers | 15 | Leetcode-cn.com/problems/ad… |
31. Next permutation | 15 | Leetcode-cn.com/problems/ne… |
240. Search two-dimensional matrix II | 15 | Leetcode-cn.com/problems/se… |
122. The best time to Buy and sell stocks II | 15 | Leetcode-cn.com/problems/be… |
129. Find the sum of numbers from root to leaf | 15 | Leetcode-cn.com/problems/su… |
92. Reverse linked list II | 15 | Leetcode-cn.com/problems/re… |
718. Longest repeating subarray | 14 | Leetcode-cn.com/problems/ma… |
151. Flip the words in the string | 13 | Leetcode-cn.com/problems/re… |
64. Minimum path sum | 13 | Leetcode-cn.com/problems/mi… |
62. Different paths | 13 | Leetcode-cn.com/problems/un… |
104. Maximum depth of a binary tree | 13 | Leetcode-cn.com/problems/ma… |
83. Delete duplicate elements from sorted linked lists | 13 | Leetcode-cn.com/problems/re… |
162. Look for peaks | 13 | Leetcode-cn.com/problems/fi… |
226. Flip the binary tree | 13 | Leetcode-cn.com/problems/in… |
209. Smallest subarray of length | 13 | Leetcode-cn.com/problems/mi… |
165. Compare version numbers | 13 | Leetcode-cn.com/problems/co… |
518. Change II | 12 | Leetcode-cn.com/problems/co… |
76. Minimum coverage substring | 12 | Leetcode-cn.com/problems/mi… |
32. The longest valid bracket | 12 | Leetcode-cn.com/problems/lo… |
93. Restore the IP address | 12 | Leetcode-cn.com/problems/re… |
Delete the penultimate node of the linked list | 12 | Leetcode-cn.com/problems/re… |
4. Find the median of two positive ordinal groups | 12 | Leetcode-cn.com/problems/me… |
48. Rotate the image | 12 | Leetcode-cn.com/problems/ro… |
78. The subset | 11 | Leetcode-cn.com/problems/su… |
Offer 09. Implement queues with two stacks | 11 | Leetcode-cn.com/problems/yo… |
230. The KTH smallest element in a binary search tree | 11 | Leetcode-cn.com/problems/kt… |
1143. Longest common subsequence | 11 | Leetcode-cn.com/problems/lo… |
322. Change | 11 | Leetcode-cn.com/problems/co… |
695. The largest area of the island | 11 | Leetcode-cn.com/problems/ma… |
144. Antecedent traversal of binary trees | 11 | Leetcode-cn.com/problems/bi… |
148. Sort linked lists | 11 | Leetcode-cn.com/problems/so… |
470. Implement Rand10() with Rand7() | 11 | Leetcode-cn.com/problems/im… |
198. Robbery | 11 | Leetcode-cn.com/problems/ho… |
4. Quick sorting by hand | 11 | Leetcode-cn.com/problems/so… |
394. String decoding | 10 | Leetcode-cn.com/problems/de… |
72. Edit distance | 10 | Leetcode-cn.com/problems/ed… |
224. Basic calculator | 10 | Leetcode-cn.com/problems/ba… |
Delete duplicate element II from sorted list | 10 | Leetcode-cn.com/problems/re… |
36. Binary search tree with bidirectional linked list | 9 | Leetcode-cn.com/problems/er… |
Swap nodes in a linked list in pairs | 9 | Leetcode-cn.com/problems/sw… |
739. Daily temperature | 9 | Leetcode-cn.com/problems/da… |
79. Word search | 9 | Leetcode-cn.com/problems/wo… |
Maximum sliding window value | 9 | Leetcode-cn.com/problems/sl… |
Supplementary problem 2. Circle return to origin problem | 9 | Mp.weixin.qq.com/s/VnGFEWHeD… |
And the shortest subarray of at least K | 8 | Leetcode-cn.com/problems/sh… |
662. Maximum width of binary tree | 8 | Leetcode-cn.com/problems/ma… |
138. Copy linked lists with random Pointers | 8 | Leetcode-cn.com/problems/co… |
34. Find the first and last positions of elements in a sorted array | 8 | Leetcode-cn.com/problems/fi… |
440. The KTH smallest digit in lexicographical order | 8 | Leetcode-cn.com/problems/k-… |
Supplementary question 9. 36 Base addition | 8 | Mp.weixin.qq.com/s/bgD1Q5lc9… |
128. Longest continuous sequence | 7 | Leetcode-cn.com/problems/lo… |
468. Verify the IP address | 7 | Leetcode-cn.com/problems/va… |
221. Largest square | 7 | Leetcode-cn.com/problems/ma… |
22. Parenthesis generation | 7 | Leetcode-cn.com/problems/ge… |
21. Reorder the array so that the odd number precedes the even number | 7 | Leetcode-cn.com/problems/di… |
460. LFU cache | 7 | Leetcode-cn.com/problems/lf… |
179. Most of large Numbers | 7 | Leetcode-cn.com/problems/la… |
Binary search | 7 | Leetcode-cn.com/problems/bi… |
114. Binary tree expands to a linked list | 7 | Leetcode-cn.com/problems/fl… |
Offer 27. Mirror of binary tree | 7 | Leetcode-cn.com/problems/er… |
59. Spiral matrix II | 7 | Leetcode-cn.com/problems/sp… |
287. Find the number of repetitions | 7 | Leetcode-cn.com/problems/fi… |
11. Container that holds the most water | 7 | Leetcode-cn.com/problems/co… |
344. Reverse the string | 6 | Leetcode-cn.com/problems/re… |
14. Longest public prefix | 6 | Leetcode-cn.com/problems/lo… |
61. An order in a playing card | 6 | Leetcode-cn.com/problems/bu… |
The KTH largest node in the binary search tree | 6 | Leetcode-cn.com/problems/er… |
297. Serialization and deserialization of binary trees | 6 | Leetcode-cn.com/problems/se… |
8. String conversion to integer (AToi) | 6 | Leetcode-cn.com/problems/st… |
670. Maximum exchange | 6 | Leetcode-cn.com/problems/ma… |
61. Rotate linked lists | 6 | Leetcode-cn.com/problems/ro… |
Sword refers to Offer 51. Reverse pair in array | 6 | Leetcode-cn.com/problems/sh… |
225. Implement stacks with queues | 6 | Leetcode-cn.com/problems/im… |
Supplement3. Find the interval minimum times the interval sum maximum | 6 | Mp.weixin.qq.com/s/ABNN4lJpv… |
Supplementary question 7. Wood cutting | 6 | Mp.weixin.qq.com/s/o-1VJO2TQ… |
977. Square of an ordered array | 5 | Leetcode-cn.com/problems/sq… |
108. Convert an ordered array to a binary search tree | 5 | Leetcode-cn.com/problems/co… |
560. And are subarrays of K | 5 | Leetcode-cn.com/problems/su… |
145. Back-order traversal of binary trees | 5 | Leetcode-cn.com/problems/bi… |
283. Move the zero | 5 | Leetcode-cn.com/problems/mo… |
191. The number of bits 1 | 5 | Leetcode-cn.com/problems/nu… |
189. Rotate the array | 5 | Leetcode-cn.com/problems/ro… |
125. Verify palindrome strings | 5 | Leetcode-cn.com/problems/va… |
Point to Offer 62. Last remaining number in the circle | 5 | Leetcode-cn.com/problems/yu… |
1047. Remove all adjacent duplicates from a string | 5 | Leetcode-cn.com/problems/re… |
Offer 45. Arrange the array to the smallest number | 4 | Leetcode-cn.com/problems/ba… |
Pointer to Offer 48. Longest substring without repeating characters | 4 | Leetcode-cn.com/problems/zu… |
680. Validate palindrome string ⅱ | 4 | Leetcode-cn.com/problems/va… |
328. Odd-even linked lists | 4 | Leetcode-cn.com/problems/od… |
136. A number that appears only once | 4 | Leetcode-cn.com/problems/si… |
11. Rotate the smallest number in the array | 4 | Leetcode-cn.com/problems/xu… |
Offer 33. Post-order traversal sequence of binary search tree | 4 | Leetcode-cn.com/problems/er… |
509. Fibonacci numbers | 4 | Leetcode-cn.com/problems/fi… |
Sword refers to Offer 10-II. Frog jump step problem | 4 | Leetcode-cn.com/problems/qi… |
152. Maximum subarray of product | 4 | Leetcode-cn.com/problems/ma… |
40. Sum of combinations II | 4 | Leetcode-cn.com/problems/co… |
71. Simplify paths | 4 | Leetcode-cn.com/problems/si… |
402. Remove the K digits | 4 | Leetcode-cn.com/problems/re… |
135. Give out candy | 4 | Leetcode-cn.com/problems/ca… |
26. Remove duplicates from sorted array | 4 | Leetcode-cn.com/problems/re… |
329. The longest increasing path in a matrix | 4 | Leetcode-cn.com/problems/lo… |
227. Basic Calculator II | 4 | Leetcode-cn.com/problems/ba… |
456. The 132 model | 4 | Leetcode-cn.com/problems/13… |
528. Randomly selected according to weight | 4 | Leetcode-cn.com/problems/ra… |
242. Valid letter heterotopic words | 4 | Leetcode-cn.com/problems/va… |
443. Compress strings | 4 | Leetcode-cn.com/problems/st… |
75. Color classification | 4 | Leetcode-cn.com/problems/so… |
Sword refers to Offer 52. The first common node of two linked lists | 3 | Leetcode-cn.com/problems/li… |
139. Word split | 3 | Leetcode-cn.com/problems/wo… |
503. The next larger element II | 3 | Leetcode-cn.com/problems/ne… |
86. Separate linked lists | 3 | Leetcode-cn.com/problems/pa… |
347. The first K high frequency elements | 3 | Leetcode-cn.com/problems/to… |
7. Integer inversion | 3 | Leetcode-cn.com/problems/re… |
63. Different paths II | 3 | Leetcode-cn.com/problems/un… |
Sword finger Offer 24. Reverse the linked list | 3 | Leetcode-cn.com/problems/fa… |
264. The ugly number II | 3 | Leetcode-cn.com/problems/ug… |
349. Intersection of two arrays | 3 | Leetcode-cn.com/problems/in… |
188. The best time to buy and sell stocks IV | 3 | Leetcode-cn.com/problems/be… |
Reference to Offer 04. Search in a two-dimensional array | 3 | Leetcode-cn.com/problems/er… |
210. Curriculum II | 3 | Leetcode-cn.com/problems/co… |
49. Grouping of letter heterotopic words | 3 | Leetcode-cn.com/problems/gr… |
17. Alphabetic combinations of telephone numbers | 3 | Leetcode-cn.com/problems/le… |
498. Diagonal traversal | 3 | Leetcode-cn.com/problems/di… |
97. Interleaved strings | 3 | Leetcode-cn.com/problems/in… |
50. Pow(x, n) | 3 | Leetcode-cn.com/problems/po… |
16. The sum of the nearest three | 3 | Leetcode-cn.com/problems/3s… |
134. The gas station | 3 | Leetcode-cn.com/problems/ga… |
Count the number of elements on the right less than the current element | 3 | Leetcode-cn.com/problems/co… |
120. Minimum path sum of triangles | 3 | Leetcode-cn.com/problems/tr… |
91. Decoding method | 3 | Leetcode-cn.com/problems/de… |
Find the target value in the mountain array | 3 | Leetcode-cn.com/problems/fi… |
334. Increasing triadic subsequences | 3 | Leetcode-cn.com/problems/in… |
Find the minimum value in the rotation sort array | 3 | Leetcode-cn.com/problems/fi… |
80. Delete duplicate item II from sorted array | 3 | Leetcode-cn.com/problems/re… |
46. Translate numbers into strings | 3 | Leetcode-cn.com/problems/ba… |
84. Largest rectangle in a bar chart | 3 | Leetcode-cn.com/problems/la… |
Offer 10-i. Fibonacci sequence | 3 | Leetcode-cn.com/problems/fe… |
5. Hand tear merge sort | 3 | Leetcode-cn.com/problems/so… |
556. The next larger element III | 3 | Leetcode-cn.com/problems/ne… |
1201. The number of ugly III | 2 | Leetcode-cn.com/problems/ug… |
1254. Count closed islands | 2 | Leetcode-cn.com/problems/nu… |
67. Binary summation | 2 | Leetcode-cn.com/problems/ad… |
190. Reverse binary bits | 2 | Leetcode-cn.com/problems/re… |
572. A subtree of another tree | 2 | Leetcode-cn.com/problems/su… |
Offer 39. A number that occurs more than half the time in the array | 2 | Leetcode-cn.com/problems/sh… |
405. Convert digits to hexadecimal numbers | 2 | Leetcode-cn.com/problems/co… |
Offer 07. Rebuild binary tree | 2 | Leetcode-cn.com/problems/zh… |
257. All paths to a binary tree | 2 | Leetcode-cn.com/problems/bi… |
Finger Offer 32-iii. Print binary tree III from top to bottom | 2 | Leetcode-cn.com/problems/co… |
445. Add two numbers II | 2 | Leetcode-cn.com/problems/ad… |
Finger Offer 29. Print matrix clockwise | 2 | Leetcode-cn.com/problems/sh… |
The sword refers to Offer 38. Arrangement of strings | 2 | Leetcode-cn.com/problems/zi… |
701. Insert operations in binary search trees | 2 | Leetcode-cn.com/problems/in… |
421. The maximum xOR value of two numbers in an array | 2 | Leetcode-cn.com/problems/ma… |
Restore binary search tree | 2 | Leetcode-cn.com/problems/re… |
523. Sum of contiguous subarrays | 2 | Leetcode-cn.com/problems/co… |
164. Maximum spacing | 2 | Leetcode-cn.com/problems/ma… |
03.05. Stack sorting | 2 | Leetcode-cn.com/problems/so… |
208. Implement Trie (Prefix Tree) | 2 | Leetcode-cn.com/problems/im… |
19. Regular expression matching | 2 | Leetcode-cn.com/problems/zh… |
Refer to Offer 59-II. Maximum number of queues | 2 | Leetcode-cn.com/problems/du… |
895. Maximum frequency stack | 2 | Leetcode-cn.com/problems/ma… |
557. Reverse the word III in the string | 2 | Leetcode-cn.com/problems/re… |
398. Random number index | 2 | Leetcode-cn.com/problems/ra… |
268. Missing numbers | 2 | Leetcode-cn.com/problems/mi… |
85. Maximum rectangle | 2 | Leetcode-cn.com/problems/ma… |
1363. Forms the maximum multiple of three | 2 | Leetcode-cn.com/problems/la… |
107. Hierarchical traversal of binary trees II | 2 | Leetcode-cn.com/problems/bi… |
44. Wildcard matching | 2 | Leetcode-cn.com/problems/wi… |
45. Jump Game II | 2 | Leetcode-cn.com/problems/ju… |
416. Segmentation and subsets | 2 | Leetcode-cn.com/problems/pa… |
238. Product of arrays other than itself | 2 | Leetcode-cn.com/problems/pr… |
807. Maintain the city skyline | 2 | Leetcode-cn.com/problems/ma… |
123. The best time to Buy and sell stocks III | 2 | Leetcode-cn.com/problems/be… |
340. The largest string containing at most K distinct characters | 2 | Leetcode-cn.com/problems/lo… |
Find the minimum value II in the rotation sorted array | 2 | Leetcode-cn.com/problems/fi… |
668. The KTH smallest number in the multiplication table | 2 | Leetcode-cn.com/problems/kt… |
77. The combination | 2 | Leetcode-cn.com/problems/co… |
213. Robbery II | 2 | Leetcode-cn.com/problems/ho… |
438. Find all letter heterotopic words in the string | 2 | Leetcode-cn.com/problems/fi… |
Insert sort on linked lists | 2 | Leetcode-cn.com/problems/in… |
785. Judge the binary graph | 2 | Leetcode-cn.com/problems/is… |
525. Contiguous arrays | 2 | Leetcode-cn.com/problems/co… |
722. Delete comments | 2 | Leetcode-cn.com/problems/re… |
260. The number III that occurs only once | 2 | Leetcode-cn.com/problems/si… |
60. Permutation K | 2 | Leetcode-cn.com/problems/pe… |
404. Sum of left leaves | 2 | Leetcode-cn.com/problems/su… |
10. Regular expression matching | 2 | Leetcode-cn.com/problems/re… |
459. Repeated substrings | 2 | Leetcode-cn.com/problems/re… |
96. Different binary search trees | 2 | Leetcode-cn.com/problems/un… |
43. String multiplication | 2 | Leetcode-cn.com/problems/mu… |
974. And subarrays divisible by K | 2 | Leetcode-cn.com/problems/su… |
18. Sum of four numbers | 2 | Leetcode-cn.com/problems/4s… |
647. A callback string | 2 | Leetcode-cn.com/problems/pa… |
Supplementary question 10.36 base subtraction | 2 | |
Supplementary question 6. Hand rip heap sort | 2 | Leetcode-cn.com/problems/so… |
74. Search a two-dimensional matrix | 2 | Leetcode-cn.com/problems/se… |
Finger Offer 53-i. Look for the number I in the sorted array | 2 | Leetcode-cn.com/problems/za… |
Supplementary question 14. Arabic numerals to Chinese numerals | 2 | |
429. Sequence traversal of N fork tree | 2 | Leetcode-cn.com/problems/n-… |
Reference to duplicate number in Offer 03 array | 2 | Leetcode-cn.com/problems/sh… |
106. Construct a binary tree by traversing sequences in middle and rear order | 2 | Leetcode-cn.com/problems/co… |