Metadata-Version: 2.4
Name: dsatantra
Version: 1.2.1
Summary: A package containing C++ and Python implementations for common DSA problems
Home-page: https://github.com/GitUtk/dsa-pkg-pypi
Author: antigravity
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Dynamic: author
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: requires-python
Dynamic: summary

# 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

```bash
pip install dsatantra
```

## Quick Start

```python
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 number `problem_num`.
- `dsa_python(problem_num)`: Retrieve the Python solution for problem number `problem_num`.

*(Note: `dsatantra_search()` and `dsatantra_get()` are also supported for backward compatibility).*

## Available Problems (1 - 40)

1. **Binary Search (Basic Iterative with Sorting)**
2. **Merge Sort (Basic)**
3. **Quick Sort (Basic)**
4. **Binary Search using Divide and Conquer**
5. **First and Last Occurrence of Element in a Sorted Array**
6. **Merge Sort with Recursion & Comparison Tracking**
7. **Inversion Pairs Count using Merge Sort**
8. **Quick Sort with Calls & Comparison Tracking**
9. **Contiguous Subarray with Largest Sum (Kadane's Algorithm)**
10. **Kth Largest Element in an Array (Min Heap)**
11. **Missing Number of the Sequence**
12. **Merge Sorted Array**
13. **Longest Binary Subarray after K Flips**
14. **Sorting by Set Bit Count using Divide and Conquer**
15. **Book Allocation with Minimum Maximum Load**
16. **Minimum Element in Rotated Sorted Array**
17. **Search in Rotated Sorted Array**
18. **Koko Eating Bananas**
19. **Single Number**
20. **Kth Missing Positive Number**
21. **Merge Two Sorted Linked Lists**
22. **Basic Hash Table Implementation**
23. **Hash Table with Double Hashing**
24. **Hash Table with Linear Probing**
25. **Hash Table with Quadratic Probing**
26. **Count Frequencies of Elements using Hashing**
27. **Check Nearby Duplicates using Hashing**
28. **Check for Pair with Given Sum using Hashing**
29. **Count Distinct Elements in Every Window of Size K**
30. **Top K Frequent Elements**
31. **Group Anagrams**
32. **Find Pair of Numbers with Target Sum**
33. **Hash Table with Separate Chaining**
34. **Maximum XOR Subarray with Hashing**
35. **Least K Elements**
36. **Count Distinct Elements in Every Window of Size K**
37. **Debugging Minimum Element using Divide and Conquer**
38. **Debugging Merge Sorted Array**
39. **Debugging Kth Smallest Element**
40. **Debugging Hash Table - Linear Probing**
