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

307 solved #71

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
zwfang merged 3 commits into master from 307-Range-Sum-Query-Mutable
Jan 29, 2019
Merged

307 solved #71

zwfang merged 3 commits into master from 307-Range-Sum-Query-Mutable
Jan 29, 2019

Conversation

Copy link
Collaborator

@zwfang zwfang commented Jan 29, 2019

/*
307. Range Sum Query - Mutable
https://leetcode.com/problems/range-sum-query-mutable/

Given an integer array nums, find the sum of the elements between indices i and j (i ≤ j), inclusive.

The update(i, val) function modifies nums by updating the element at index i to val.

Note:
The array is only modifiable by the update function.
You may assume the number of calls to update and sumRange function is distributed evenly.
*/
// time: 2019年01月29日
// 线段树时间复杂度为:O(log n)

Copy link

codecov bot commented Jan 29, 2019
edited
Loading

Codecov Report

Merging #71 into master will increase coverage by 0.02%.
The diff coverage is 100%.

Impacted file tree graph

@@ Coverage Diff @@
## master #71 +/- ##
==========================================
+ Coverage 99.31% 99.33% +0.02% 
==========================================
 Files 110 111 +1 
 Lines 1884 1926 +42 
==========================================
+ Hits 1871 1913 +42 
 Misses 9 9 
 Partials 4 4
Impacted Files Coverage Δ
...307_Range_Sum_Query_Mutable/range_sum_query_mut.go 100% <100%> (ø)

@zwfang zwfang added Medium Coefficient of difficulty medium Segment Tree storing information about intervals, or segments. labels Jan 29, 2019
@zwfang zwfang merged commit b64da5f into master Jan 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers
No reviews
Assignees
No one assigned
Labels
Medium Coefficient of difficulty medium Segment Tree storing information about intervals, or segments.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

1 participant

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