Skip to content

Releases: hoseiocean/DataStructuresKit

Fix dictionary literal duplicate key handling

23 Jan 07:25

Choose a tag to compare

Fixed

  • ExpressibleByDictionaryLiteral now correctly sums counts for duplicate keys instead of overwriting

Before (bug)

let bag: Bag = ["a": 1, "a": 2]
bag.count(of: "a") // 2 ❌
bag.totalCount     // 3 (inconsistent)

After (fixed)

let bag: Bag = ["a": 1, "a": 2]
bag.count(of: "a") // 3 ✅
bag.totalCount     // 3 ✅

Internal

  • Added validateCount helper for consistent count validation

v1.0.0 — Initial Release

21 Jan 01:05

Choose a tag to compare

DataStructuresKit 1.0.0

Initial release.

A comprehensive Swift data structures library featuring Stack, Queue, Deque, LinkedList, BinarySearchTree, AVLTree, Trie, Heap, PriorityQueue, Graph, and LRUCache.

Documentation

See README for full documentation and usage examples.