mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-18 14:30:58 +00:00
Fix multilingual content typos (#1958)
This commit is contained in:
@@ -24,6 +24,6 @@ int main() {
|
||||
size_t hashStr = hash<string>()(str);
|
||||
cout << "字符串 " << str << " 的哈希值为 " << hashStr << "\n";
|
||||
|
||||
// 在 C++ 中,内置 std:hash() 仅提供基本数据类型的哈希值计算
|
||||
// 在 C++ 中,内置 std::hash() 仅提供基本数据类型的哈希值计算
|
||||
// 数组、对象的哈希值计算需要自行实现
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ int binarySearchInsertion(const vector<int> &nums, int target) {
|
||||
if (nums[m] < target) {
|
||||
i = m + 1; // target 在区间 [m+1, j] 中
|
||||
} else {
|
||||
j = m - 1; // 首个小于 target 的元素在区间 [i, m-1] 中
|
||||
j = m - 1; // 最右一个小于 target 的元素在区间 [i, m-1] 中
|
||||
}
|
||||
}
|
||||
// 返回插入点 i
|
||||
|
||||
@@ -33,7 +33,7 @@ int binarySearchInsertion(vector<int> &nums, int target) {
|
||||
} else if (nums[m] > target) {
|
||||
j = m - 1; // target 在区间 [i, m-1] 中
|
||||
} else {
|
||||
j = m - 1; // 首个小于 target 的元素在区间 [i, m-1] 中
|
||||
j = m - 1; // 最右一个小于 target 的元素在区间 [i, m-1] 中
|
||||
}
|
||||
}
|
||||
// 返回插入点 i
|
||||
|
||||
Reference in New Issue
Block a user