dsatantra
A Python package providing clean C++ and Python implementations for 40 classic Data Structures and Algorithms (DSA) problems. Useful for competitive programming, template generation, exam revision, and learning.
Installation
pip install dsatantra
Quick Start
from dsatantra import dsa_search, dsa_cpp, dsa_python
# 1. Search & list all 40 available DSA problems
dsa_search()
# 2. Get C++ code for a specific problem (e.g. Problem 1)
cpp_code = dsa_cpp(1)
# 3. Get Python code for a specific problem (e.g. Problem 34)
py_code = dsa_python(34)
Available Functions
dsa_search(): List all available problems with their numerical IDs.dsa_cpp(problem_num): Retrieve the C++ solution for problem numberproblem_num.dsa_python(problem_num): Retrieve the Python solution for problem numberproblem_num.
(Note: dsatantra_search() and dsatantra_get() are also supported for backward compatibility).
Available Problems (1 - 40)
- Binary Search (Basic Iterative with Sorting)
- Merge Sort (Basic)
- Quick Sort (Basic)
- Binary Search using Divide and Conquer
- First and Last Occurrence of Element in a Sorted Array
- Merge Sort with Recursion & Comparison Tracking
- Inversion Pairs Count using Merge Sort
- Quick Sort with Calls & Comparison Tracking
- Contiguous Subarray with Largest Sum (Kadane's Algorithm)
- Kth Largest Element in an Array (Min Heap)
- Missing Number of the Sequence
- Merge Sorted Array
- Longest Binary Subarray after K Flips
- Sorting by Set Bit Count using Divide and Conquer
- Book Allocation with Minimum Maximum Load
- Minimum Element in Rotated Sorted Array
- Search in Rotated Sorted Array
- Koko Eating Bananas
- Single Number
- Kth Missing Positive Number
- Merge Two Sorted Linked Lists
- Basic Hash Table Implementation
- Hash Table with Double Hashing
- Hash Table with Linear Probing
- Hash Table with Quadratic Probing
- Count Frequencies of Elements using Hashing
- Check Nearby Duplicates using Hashing
- Check for Pair with Given Sum using Hashing
- Count Distinct Elements in Every Window of Size K
- Top K Frequent Elements
- Group Anagrams
- Find Pair of Numbers with Target Sum
- Hash Table with Separate Chaining
- Maximum XOR Subarray with Hashing
- Least K Elements
- Count Distinct Elements in Every Window of Size K
- Debugging Minimum Element using Divide and Conquer
- Debugging Merge Sorted Array
- Debugging Kth Smallest Element
- Debugging Hash Table - Linear Probing
Release files for dsatantra 1.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsatantra-1.2.1.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dsatantra-1.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 26.6 kB
Release files / dsatantra-1.2.1.tar.gz
| Download URL | dsatantra-1.2.1.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d14bfdcb062c99528475fe85e3473a840895efd02ac67f93e2b6bfc5ccb1fd8e
|
|
BLAKE2b-256 checksum How to use checksums |
aa22b5ebf1c3cf2d98ee93574f9478c3976d8657c1d9c943ee7df92a1e33b829
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / dsatantra-1.2.1-py3-none-any.whl
| Download URL | dsatantra-1.2.1-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aa27d18f7867215954bc221a3f29f5215b94ea35bedacfb036147fc62b875b5c
|
|
BLAKE2b-256 checksum How to use checksums |
f2e83b9085618b4b75c6aaecea12ce6c6579ce9d14ef092a9300d1355f4a6d7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|