public class FenwickTree extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
class |
FenwickTree.answer |
| Constructor and Description |
|---|
FenwickTree(int n) |
| Modifier and Type | Method and Description |
|---|---|
FenwickTree.answer |
createAnswer() |
long |
getCumulativeCount(int index)
Get the cumulative count for elements between [0-index].
|
long |
getTotalCount()
Get the cumulative count over all the elements.
|
void |
incrementCount(int index)
Increment the count of an element.
|
int |
size() |
public int size()
public void incrementCount(int index)
index - index of the element.public long getCumulativeCount(int index)
index - index of the element.public long getTotalCount()
public FenwickTree.answer createAnswer()
Copyright © 2017 Campagne Laboratory. All rights reserved.