dsa_kit 0.0.5
dsa_kit: ^0.0.5 copied to clipboard
A scalable DSA utilities kit for Dart. Includes Heaps, DeQueues, and more.
DSA KIT #
A scalable Data Structures & Algorithms toolkit for Dart, designed to make competitive programming, interview preparation, and algorithmic problem-solving more accessible in the Dart ecosystem.
π― Why dsa_kit? #
When working with Dart, you might notice that while its core libraries are powerful, they donβt provide many of the classic data structures (like heaps, deques, or specialized queues) that are common in languages such as Python (heapq, collections.deque) or Java (PriorityQueue, LinkedList).
This is where dsa_kit comes in. Itβs designed to give you the building blocks you need for problem-solving, algorithm practice, and production systems:
-
ποΈ Well-structured & SOLID β clean, maintainable, and extensible implementations.
-
π§ͺ Battle-tested β backed by strong unit tests to ensure reliability.
-
π Beginner-friendly β readable code and examples for learning and interviews.
-
β‘ Optimized for performance β suitable for competitive programming and high-throughput apps.
-
π Practical & ready-to-use β fills the gap between Dartβs core libraries and real-world problem-solving needs.
π Quick Start #
Add dsa_kit
to your pubspec.yaml
:
dependencies:
dsa_kit: <latest-version>
Run:
dart pub get
π¦ Available Data Structures #
Data Structure | Variants / Implementations | Key Features | Example Use Cases |
---|---|---|---|
Heap | - MinHeap<T> - MaxHeap<T> |
- Priority-based ordering - push , pop , peek - Works with Comparable and custom objects |
- Priority Queues - Find k-th smallest/largest - Heap Sort |
Deque (Double-Ended Queue) | - Deque<T> |
- Insert/remove from both ends - appendLeft , appendRight - popLeft , popRight - peekLeft , peekRight |
- Sliding Window Problems - Palindrome checks - BFS/DFS variations |
π οΈ Utilities #
Utility | Description | Example Usage |
---|---|---|
Int Extensions | Convenient constants for integer bounds | INT.infinity , INT.negativeInfinity |
π§ͺ Testing #
Run tests:
dart test
π Planned Features:
- Trie - For string searching and prefix operations
- Union-Find (Disjoint Set) - For dynamic connectivity problems
- Graph Utilities - BFS, DFS, shortest path algorithms
- Segment Trees - For range queries and updates
- Dynamic Programming Helpers - Memoization utilities and common DP patterns
- Advanced Trees - AVL, Red-Black trees
- String Algorithms - KMP, Rabin-Karp implementations
π Changelog #
See CHANGELOG.md for detailed version history.
π License #
This project is licensed under the MIT License - see the LICENSE file for details.
π¨βπ» Author #
Vishwa Karthik
Software Engineer passionate about algorithms and clean code
- π Domain: in.vishwakarthik