Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[pull] main from itcharge:main #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
pull merged 18 commits into AlgorithmAndLeetCode:main from itcharge:main
Jul 21, 2022
Merged
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
9bea1cd
更新题解列表
itcharge Jul 21, 2022
9627f49
更新章节列表
itcharge Jul 21, 2022
8127501
Update 0035. 搜索插入位置.md
itcharge Jul 21, 2022
6fe2fa9
Update 0004. 寻找两个正序数组的中位数.md
itcharge Jul 21, 2022
523d068
Update 0128. 最长连续序列.md
itcharge Jul 21, 2022
2f0f572
Update 0215. 数组中的第K个最大元素.md
itcharge Jul 21, 2022
6702825
Update 0303. 区域和检索 - 数组不可变.md
itcharge Jul 21, 2022
79bf079
Update 0307. 区域和检索 - 数组可修改.md
itcharge Jul 21, 2022
a48c8fd
Update 0370. 区间加法.md
itcharge Jul 21, 2022
75de141
Update 0715. Range 模块.md
itcharge Jul 21, 2022
afde623
Update 0912. 排序数组.md
itcharge Jul 21, 2022
6304f12
Update 1099. 小于 K 的两数之和.md
itcharge Jul 21, 2022
5c18ff7
Update 1109. 航班预订统计.md
itcharge Jul 21, 2022
c1f4f6d
Update 1310. 子数组异或查询.md
itcharge Jul 21, 2022
23362c9
Update 剑指 Offer II 119. 最长连续序列.md
itcharge Jul 21, 2022
5e64245
Update 0300. 最长递增子序列.md
itcharge Jul 21, 2022
4b7e493
Update 0118. 杨辉三角.md
itcharge Jul 21, 2022
df8e274
Update 0118. 杨辉三角.md
itcharge Jul 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update 0715. Range 模块.md
  • Loading branch information
itcharge committed Jul 21, 2022
commit 75de14102d961cefea16ad27ea2eedfc0ea5edfb
2 changes: 1 addition & 1 deletion Solutions/0715. Range 模块.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ rangeModule.queryRange(16, 17) -> True

区间的范围是 $[0, 10^9],ドル普通数组构成的线段树不满足要求。需要用到动态开点线段树。题目要求的是半开区间 `[left, right)` ,而线段树中常用的是闭合区间。但是我们可以将半开区间 `[left, right)` 转为 `[left, right - 1]` 的闭合空间。

这样构建线段树的时间复杂度为 $O(log_2n),ドル单次区间更新的时间复杂度为 $O(log_2n),ドル单次区间查询的时间复杂度为 $O(log_2n)$。总体时间复杂度为 $O(log_2n)$。
这样构建线段树的时间复杂度为 $O(\\log n),ドル单次区间更新的时间复杂度为 $O(\log n),ドル单次区间查询的时间复杂度为 $O(\log n)$。总体时间复杂度为 $O(\log n)$。

## 代码

Expand Down

AltStyle によって変換されたページ (->オリジナル) /