Skip to content

Commit ce5a80a

Browse files
committed
feat: i18n update
1 parent 925e879 commit ce5a80a

File tree

3 files changed

+165
-63
lines changed

3 files changed

+165
-63
lines changed

‎src/locales/en.js

+53
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,28 @@ const en = {
6060
notYet: "Not yet",
6161
},
6262
problem: {
63+
69: "69. Sqrt(x)",
64+
278: "278. First Bad Version",
65+
"278_desc": "The idea of the leftmost and rightmost is the same. Everyone can practice two questions. The actual situation can use different binary search according to the meaning of the question.",
66+
327: "327. Count of Range Sum",
67+
493: "493. Reverse Pairs",
6368
743: "743. Network Delay Time",
69+
778: "778. Swim in Rising Water",
70+
"778_desc": "DFS + binary search, there are many similar questions, such as the 1439th question. This kind of question routine is very similar, and the difficulty is not big.",
6471
1109: "1109. Corporate Flight Bookings",
6572
1314: "1314. Matrix Block Sum",
6673
1462: "1462. Course Schedule IV",
6774
1480: "1480. Running Sum of 1d Array",
6875
1584: "1584. Min Cost to Connect All Points",
6976
2536: "2536. Increment Submatrices by One",
77+
minimumLightRadius: "Minimum Light Radius",
78+
minimumLightRadius_desc: "Classic ability detection binary search, leetcode also has a similar topic",
79+
kthPairDistance: "Kth Smallest Distance Pair",
80+
kthPairDistance_desc: "Typical counting binary search, which is essentially an ability test, but the number of questions is large, so it is separated.",
81+
JZ51: "Sword Offer 51. Reverse pairs in an array",
82+
83+
longestIncreasingSubsequence: "Longest Increasing Subsequence Series",
84+
longestIncreasingSubsequence_desc: "Series classic topic, worth doing",
7085
},
7186
codeTemplate: {
7287
name: "Code Template",
@@ -137,6 +152,44 @@ const en = {
137152
},
138153
learningRoute: {
139154
name: "Learning Route",
155+
dp: "Dynamic Programming",
156+
binarySearch: "Binary Search",
157+
binarySearchDesc:`
158+
If you ask me to summarize binary search in one sentence, I would say that binary search is an algorithm that makes the unknown world inorganic. That is, no matter what, we can discard half of the solutions, that is, we can cut the solution space in half.
159+
The difficulty is two points: **what conditions** and **which part to discard**. This is the core problem that binary search needs to solve.
160+
161+
There are two basic types of tactics, namely the leftmost insertion binary search and the rightmost insertion binary search.
162+
163+
There are four basic types of strategies: ability detection binary search, prefix sum binary search, insertion sort binary search, and counting binary search.
164+
165+
These two parts are very practical. While understanding these two parts, please keep in mind a central point **half**.
166+
167+
For more information, please visit: https://lucifer.ren/blog/2021/03/08/binary-search-1`,
168+
binarySearch_item1: "Leftmost/Rightmost Binary Search",
169+
binarySearch_item1_text: "Code reference: Code templates - Binary",
170+
binarySearch_item1_keys: `
171+
1. shrink the right boundary continuously and finally return the left boundary
172+
2. shrink the left boundary continuously and finally return the right boundary
173+
`,
174+
binarySearch_item2: "Ability Detection Binary Search",
175+
binarySearch_item2_keys: `Define the function that the possible argument is mid and the return value is a Boolean value. The outer layer adjusts according to the return value "; Solution space" . The sample code is an example of the leftmost binary.
176+
`,
177+
binarySearch_item3: "Prefix Sum Binary Search",
178+
binarySearch_item3_keys: `
179+
If the array is non-negative, then the prefix sum is a monotone non-decrement array, and we can sometimes make dichotomies based on it.
180+
`,
181+
binarySearch_item4: "Insertion Sort Binary Search",
182+
binarySearch_item4_keys: `
183+
Continuously insert and maintain the ordered sequence, and then use the ordered sequence to do something.
184+
`,
185+
binarySearch_item5: "Counting Binary Search",
186+
binarySearch_item5_keys: `The essence is also ability detection, so it is basically the same as the ability detection framework. Everyone compares and understands.
187+
`,
188+
189+
tree: "Tree",
190+
linkedList: "Linked List",
191+
clickToEnlarge: "Click to enlarge",
192+
recommendedProblems:"Recommended Problems",
140193
},
141194
checkForUpdates: {
142195
name: "Check for Updates",

‎src/locales/zh.js

+58
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,31 @@ const zh = {
5757
notYet: "暂无",
5858
},
5959
problem: {
60+
69: "69. x 的平方根",
61+
278: "278. 第一个错误的版本",
62+
"278_desc":
63+
"最左最右思路一样,大家练习两道,实际情况根据题意使用不同的二分即可。",
64+
327: "327. 区间和的个数",
65+
493: "493. 翻转对",
6066
743: "743. 网络延迟时间",
67+
778: "778. 水位上升的泳池中游泳",
68+
"778_desc":
69+
"DFS + 二分,类似的题目有很多,比如第 1439 题。这种题套路都很像,难度其实也不算大。",
6170
1109: "1109. 航班预订统计",
6271
1314: "1314. 矩���区域和",
6372
1462: "1462. 课程表 IV",
6473
1480: "1480. 一维数组的动态和",
6574
1584: "1584. 连接所有点的最小费用",
6675
2536: "2536. 子矩阵元素加 1",
76+
77+
minimumLightRadius: "最小光照半径",
78+
minimumLightRadius_desc: "经典能力检测二分,力扣也有一道类似题",
79+
kthPairDistance: "第 K 小的距离对",
80+
kthPairDistance_desc: "典型的计数二分,本质上也是能力检测,只不过题量大,单独拆出来。",
81+
JZ51: "剑指 Offer 51. 数组中的逆序对",
82+
83+
longestIncreasingSubsequence: "最长上升子序列系列",
84+
longestIncreasingSubsequence_desc: "系列经典题目,值得一做",
6785
},
6886
codeTemplate: {
6987
name: "代码模板",
@@ -130,6 +148,46 @@ const zh = {
130148
},
131149
learningRoute: {
132150
name: "学习路线",
151+
dp: "动态规划",
152+
binarySearch: "二分查找",
153+
binarySearchDesc: `
154+
如果让我用一句话总结二分法,我会说**二分法是一种让未知世界无机可乘的算法**。即二分法无论如何我们都可以舍弃一半解,也就是无论如何都可以将解空间砍半。
155+
难点就是两点:**什么条件** 和 **舍弃哪部分**。这是二分法核心要解决的问题。
156+
157+
从战术上有两种基本类型,分别是最左插入二分和最右插入二分。
158+
159+
从战略上有四种基本类型,能力检测二分,前缀和二分,插入排序二分和计数二分。
160+
161+
两种类型(最左和最右插入)主要解决的的是:**解空间已经明确出来了,如何用代码找出具体的解**。而四大应用主要解决的是:**如何构造解空间**。更多的情况则是如何构建有序序列。
162+
163+
这两部分都是实操性很强的内容,在理解这两部分内容的同时,请大家务必牢记一个中心**折半**。
164+
165+
更多内容请访问:https://lucifer.ren/blog/2021/03/08/binary-search-1`,
166+
binarySearch_item1: "最左/最右二分",
167+
binarySearch_item1_text: "代码参考:代码模板 - 二分法",
168+
binarySearch_item1_keys: `
169+
1. 最左二分不断收缩右边界,最终返回左边界
170+
2. 最右二分不断收缩左边界,最终返回右边界
171+
`,
172+
binarySearch_item2: "能力检测二分",
173+
binarySearch_item2_keys: `定义函数 possible 参数是 mid,返回值是布尔值。外层根据返回值调整"解空间"。示例代码是以最左二分为例的。
174+
`,
175+
binarySearch_item3: "前缀和二分",
176+
binarySearch_item3_keys: `
177+
如果数组是非负的,那么前缀和就是一个单调不递减数组,我们有时候可以基于它来做二分。
178+
`,
179+
binarySearch_item4: "插入排序二分",
180+
binarySearch_item4_keys: `
181+
不断插入并维护序列有序,进而利用有序做一些事情。
182+
`,
183+
binarySearch_item5: "计数二分",
184+
binarySearch_item5_keys: `本质也是能力检测,因此��能力检测框架基本一致,大家对比理解一下。
185+
`,
186+
187+
tree: "树",
188+
linkedList: "链表",
189+
clickToEnlarge: "单击可放大",
190+
recommendedProblems: "推荐题目",
133191
},
134192
checkForUpdates: {
135193
name: "检查更新",

0 commit comments

Comments
 (0)