MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / point_query

Method point_query

src/data_structures/fenwick_tree.rs:143–156  ·  view source on GitHub ↗

Retrieves the value at a specific index by isolating it from the prefix sum. This operation determines the value at `index` by subtracting the prefix sum up to `index - 1` from the prefix sum up to `index`. # Arguments `index` - The zero-based index of the element to retrieve. # Returns A `Result` containing the value at the specified index (`Ok(value)`) or an error (`FenwickTreeError::IndexO

(&self, index: usize)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

setMethod · 0.80

Calls 2

prefix_queryMethod · 0.80
lenMethod · 0.45

Tested by

no test coverage detected