Skip to content

v1.4.0

Latest

Choose a tag to compare

@mstgnz mstgnz released this 22 Apr 11:39

What's Changed

Breaking Changes

  • NewSegmentTree now requires a third argument defaultValue int (the identity element for the combine function). Update callers:
    • Sum: NewSegmentTree(arr, SumCombine, 0)
    • Min: NewSegmentTree(arr, MinCombine, math.MaxInt32)
    • Max: NewSegmentTree(arr, MaxCombine, math.MinInt32)

Improvements

  • Removed golang.org/x/exp dependency; utils.Numeric and utils.Ordered are now defined with plain Go type unions (no external packages required)
  • Fixed LinkedListQueue and LinkedListStack List() to correctly return the sentinel node after all elements are removed
  • All inline comments are now in English

Documentation

  • README rewritten to accurately list all implemented data structures and algorithms, including previously undocumented ones: B+ Tree, Splay Tree, Radix Tree, Ternary Search
    Tree, Segment Tree, Leftist Heap, Skew Heap, Bloom Filter, LRU Cache, Skip List, Disjoint Set, Euler Path, Hamiltonian Path, Articulation Points, Shell/Counting/Radix sort, and
    string algorithms (KMP, Rabin-Karp, Boyer-Moore, LCS, Levenshtein)