Skip to content

Releases: mstgnz/data-structures

v1.4.0

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)

v1.3.0

Choose a tag to compare

@mstgnz mstgnz released this 08 Mar 20:11

fix all tests

v1.2.0

Choose a tag to compare

@mstgnz mstgnz released this 02 Jan 10:27

generic type support

v1.1.0

Choose a tag to compare

@mstgnz mstgnz released this 02 Jan 08:47

ordered map

v1.0.0

Choose a tag to compare

@mstgnz mstgnz released this 01 Jan 21:04

[1.0.0] - 2025-01-02

Added

  • Basic data structure implementations:
    • Linked List (Singly, Doubly, Circular)
    • Stack
    • Queue
    • Tree
    • Heap
    • Hash Table
  • Graph data structures and algorithms:
    • Adjacency Matrix
    • Adjacency List
    • DFS and BFS algorithms
    • Topological Sort
  • Sorting algorithms:
    • Bubble Sort
    • Selection Sort
    • Insertion Sort
    • Quick Sort
    • Merge Sort
    • Heap Sort
  • Searching algorithms:
    • Linear Search
    • Binary Search
    • Interpolation Search
  • Comprehensive test coverage
  • Example usage and documentation
  • Go 1.23 support

Changed

  • Performance optimizations
  • Generic type support
  • Thread-safe implementations

Fixed

  • Memory leak issues
  • Concurrency bugs
  • Edge case handling

Security

  • Mutex implementation for thread-safe operations
  • Secure memory management

[0.2.0] - 2024-01-05

Added

  • Graph algorithm implementations
  • Heap data structure
  • Hash Table implementation
  • New test cases

Changed

  • Performance improvements
  • Code organization
  • Documentation updates

[0.1.0] - 2024-01-04

Added

  • Initial basic data structures:
    • Linked List
    • Stack
    • Queue
    • Binary Tree
  • Basic test coverage
  • README documentation
  • License file
  • Contributing guidelines