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 |
Initializes the object with the integer array nums.
在文件 leetcode.cpp 第 5657 行定义.
|
nodiscard |
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 行定义.
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().