problemscpp
A collection of my answers to algorithm problems in c++.
|
#include <leetcode.h>
Public 成员函数 | |
NumArray (vector< int > &nums) | |
Initializes the object with the integer array nums. 更多... | |
int | sumRange (int left, int right) const |
Returns the sum of the elements of nums between indices left and right inclusive (i.e. nums[left] + nums[left + 1] + ... + nums[right]). 更多... | |
void | update (int index, int val) |
Updates the value of nums[index] to be val. 更多... | |
Private 属性 | |
vector< int > & | nums |
int | size |
vector< int > | sum |
在文件 leetcode.h 第 2091 行定义.
|
explicit |
int leetcode::range_sum_query_mutable::NumArray::sumRange | ( | int | left, |
int | right | ||
) | const |
Returns the sum of the elements of nums between indices left and right inclusive (i.e. nums[left] + nums[left + 1] + ... + nums[right]).
在文件 leetcode.cpp 第 5672 行定义.
引用了 acwing::acwing1929::left, nums, acwing::acwing1929::right, size , 以及 sum.
void leetcode::range_sum_query_mutable::NumArray::update | ( | int | index, |
int | val | ||
) |
|
private |
在文件 leetcode.h 第 2094 行定义.
被这些函数引用 NumArray(), sumRange() , 以及 update().
|
private |
在文件 leetcode.h 第 2093 行定义.
被这些函数引用 NumArray(), sumRange() , 以及 update().
|
private |
在文件 leetcode.h 第 2092 行定义.
被这些函数引用 NumArray(), sumRange() , 以及 update().