github.com/yourbasic/fenwick
Package fenwick provides a list data structure supporting prefix sums. A Fenwick tree, or binary indexed tree, is a space-efficient list data structure that can efficiently update elements and calculate prefix sums in a list of numbers. Compared to a common array, a Fenwick tree achieves better balance between element update and prefix sum calculation – both operations run in O(log n) time – while using the same amount of memory. This is achieved by representing the list as an implicit tree, where the value of each node is the sum of the numbers in that subtree. Compute the sum of the first 4 elements in a list.
proxy.golang.org
v0.0.0-20180312213232-5f8823d88d15
almost 8 years ago
1
1
Links
| Registry | proxy.golang.org |
| Source | Repository |
| Docs | Documentation |
| JSON API | View JSON |
| CodeMeta | codemeta.json |
Package Details
| PURL |
pkg:golang/github.com/yourbasic/fenwick
spec |
| License | BSD-2-Clause |
| Namespace | github.com/yourbasic |
| First Release | almost 8 years ago |
| Last Synced | 15 days ago |
Repository
| Stars | 40 on GitHub |
| Forks | 18 on GitHub |