partial_sum
Syntax: #include <numeric> iterator partial_sum( iterator start, iterator end, iterator result ); iterator partial_sum( iterator start, iterator end, iterator result, BinOp p ); The partial_sum() function calculates the partial sum of a range defined by [start,end), storing the output at result.
partial_sum() runs in linear time. Related topics:
|