pythontantra 1.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pythontantra-1.0.0/PKG-INFO +111 -0
- pythontantra-1.0.0/README.md +92 -0
- pythontantra-1.0.0/pythontantra/__init__.py +37 -0
- pythontantra-1.0.0/pythontantra/algorithms.py +438 -0
- pythontantra-1.0.0/pythontantra/mcq_data.json +476 -0
- pythontantra-1.0.0/pythontantra.egg-info/PKG-INFO +111 -0
- pythontantra-1.0.0/pythontantra.egg-info/SOURCES.txt +9 -0
- pythontantra-1.0.0/pythontantra.egg-info/dependency_links.txt +1 -0
- pythontantra-1.0.0/pythontantra.egg-info/top_level.txt +1 -0
- pythontantra-1.0.0/setup.cfg +4 -0
- pythontantra-1.0.0/setup.py +26 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pythontantra
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A package containing C++ and Python implementations for common DSA problems
|
|
5
|
+
Home-page: https://github.com/GitUtk/dsa-pkg-pypi
|
|
6
|
+
Author: antigravity
|
|
7
|
+
Classifier: Programming Language :: Python :: 3
|
|
8
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
9
|
+
Classifier: Operating System :: OS Independent
|
|
10
|
+
Requires-Python: >=3.6
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
Dynamic: author
|
|
13
|
+
Dynamic: classifier
|
|
14
|
+
Dynamic: description
|
|
15
|
+
Dynamic: description-content-type
|
|
16
|
+
Dynamic: home-page
|
|
17
|
+
Dynamic: requires-python
|
|
18
|
+
Dynamic: summary
|
|
19
|
+
|
|
20
|
+
# pythontantra
|
|
21
|
+
|
|
22
|
+
A Python package providing clean C++ and Python implementations for **48** classic Data Structures and Algorithms (DSA) problems, along with a fuzzy-searchable **79+ MCQ bank** for exams, interviews, and revision.
|
|
23
|
+
|
|
24
|
+
## Installation
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
pip install pythontantra
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Quick Start
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
from pythontantra import dsa_search, dsa_cpp, dsa_python, dsa_mcq, dsa_help
|
|
34
|
+
|
|
35
|
+
# 1. Search & list all 48 available DSA problems
|
|
36
|
+
dsa_search()
|
|
37
|
+
|
|
38
|
+
# 2. Get C++ code for a specific problem (e.g. Problem 48)
|
|
39
|
+
dsa_cpp(48)
|
|
40
|
+
|
|
41
|
+
# 3. Get Python code for a specific problem (e.g. Problem 48)
|
|
42
|
+
dsa_python(48)
|
|
43
|
+
|
|
44
|
+
# 4. Fuzzy search MCQ bank (79+ questions with answers)
|
|
45
|
+
dsa_mcq("binary search")
|
|
46
|
+
dsa_mcq("double hashing")
|
|
47
|
+
|
|
48
|
+
# 5. Display interactive help manual
|
|
49
|
+
dsa_help()
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Available Functions
|
|
53
|
+
|
|
54
|
+
- `dsa_search()`: List all 48 available problems with their numerical IDs.
|
|
55
|
+
- `dsa_cpp(problem_num)`: Retrieve the C++ solution for problem number `problem_num` (1-48).
|
|
56
|
+
- `dsa_python(problem_num)`: Retrieve the Python solution for problem number `problem_num` (1-48).
|
|
57
|
+
- `dsa_mcq(search_query=None, limit=5)`: Fuzzy search across 79+ DSA Multiple Choice Questions by keyword/topic.
|
|
58
|
+
- `dsa_help()`: Displays comprehensive package help documentation.
|
|
59
|
+
|
|
60
|
+
*(Note: `pythontantra_search()`, `pythontantra_get()`, `pythontantra_mcq()`, and `pythontantra_help()` as well as legacy `codetantra_*` are also supported for backward compatibility).*
|
|
61
|
+
|
|
62
|
+
## Available Problems (1 - 48)
|
|
63
|
+
|
|
64
|
+
1. **Binary Search (Basic Iterative with Sorting)**
|
|
65
|
+
2. **Merge Sort (Basic)**
|
|
66
|
+
3. **Quick Sort (Basic)**
|
|
67
|
+
4. **Binary Search using Divide and Conquer**
|
|
68
|
+
5. **First and Last Occurrence of Element in a Sorted Array**
|
|
69
|
+
6. **Merge Sort with Recursion & Comparison Tracking**
|
|
70
|
+
7. **Inversion Pairs Count using Merge Sort**
|
|
71
|
+
8. **Quick Sort with Calls & Comparison Tracking**
|
|
72
|
+
9. **Contiguous Subarray with Largest Sum (Kadane's Algorithm)**
|
|
73
|
+
10. **Kth Largest Element in an Array (Min Heap)**
|
|
74
|
+
11. **Missing Number of the Sequence**
|
|
75
|
+
12. **Merge Sorted Array**
|
|
76
|
+
13. **Longest Binary Subarray after K Flips**
|
|
77
|
+
14. **Sorting by Set Bit Count using Divide and Conquer**
|
|
78
|
+
15. **Book Allocation with Minimum Maximum Load**
|
|
79
|
+
16. **Minimum Element in Rotated Sorted Array**
|
|
80
|
+
17. **Search in Rotated Sorted Array**
|
|
81
|
+
18. **Koko Eating Bananas**
|
|
82
|
+
19. **Single Number**
|
|
83
|
+
20. **Kth Missing Positive Number**
|
|
84
|
+
21. **Merge Two Sorted Linked Lists**
|
|
85
|
+
22. **Basic Hash Table Implementation**
|
|
86
|
+
23. **Hash Table with Double Hashing**
|
|
87
|
+
24. **Hash Table with Linear Probing**
|
|
88
|
+
25. **Hash Table with Quadratic Probing**
|
|
89
|
+
26. **Count Frequencies of Elements using Hashing**
|
|
90
|
+
27. **Check Nearby Duplicates using Hashing**
|
|
91
|
+
28. **Check for Pair with Given Sum using Hashing**
|
|
92
|
+
29. **Count Distinct Elements in Every Window of Size K**
|
|
93
|
+
30. **Top K Frequent Elements**
|
|
94
|
+
31. **Group Anagrams**
|
|
95
|
+
32. **Find Pair of Numbers with Target Sum**
|
|
96
|
+
33. **Hash Table with Separate Chaining**
|
|
97
|
+
34. **Maximum XOR Subarray with Hashing**
|
|
98
|
+
35. **Least K Elements**
|
|
99
|
+
36. **Count Distinct Elements in Every Window of Size K**
|
|
100
|
+
37. **Debugging Minimum Element using Divide and Conquer**
|
|
101
|
+
38. **Debugging Merge Sorted Array**
|
|
102
|
+
39. **Debugging Kth Smallest Element**
|
|
103
|
+
40. **Debugging Hash Table - Linear Probing**
|
|
104
|
+
41. **Quadratic Probing Technique**
|
|
105
|
+
42. **Linear Probing Technique**
|
|
106
|
+
43. **Strategic Battle**
|
|
107
|
+
44. **Maximum number of valid triplets**
|
|
108
|
+
45. **Hash Table using Open Hashing Separate Chaining**
|
|
109
|
+
46. **Longest Consecutive Number**
|
|
110
|
+
47. **First Non Repeating character**
|
|
111
|
+
48. **Intersection of two sorted Array**
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
# pythontantra
|
|
2
|
+
|
|
3
|
+
A Python package providing clean C++ and Python implementations for **48** classic Data Structures and Algorithms (DSA) problems, along with a fuzzy-searchable **79+ MCQ bank** for exams, interviews, and revision.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
pip install pythontantra
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```python
|
|
14
|
+
from pythontantra import dsa_search, dsa_cpp, dsa_python, dsa_mcq, dsa_help
|
|
15
|
+
|
|
16
|
+
# 1. Search & list all 48 available DSA problems
|
|
17
|
+
dsa_search()
|
|
18
|
+
|
|
19
|
+
# 2. Get C++ code for a specific problem (e.g. Problem 48)
|
|
20
|
+
dsa_cpp(48)
|
|
21
|
+
|
|
22
|
+
# 3. Get Python code for a specific problem (e.g. Problem 48)
|
|
23
|
+
dsa_python(48)
|
|
24
|
+
|
|
25
|
+
# 4. Fuzzy search MCQ bank (79+ questions with answers)
|
|
26
|
+
dsa_mcq("binary search")
|
|
27
|
+
dsa_mcq("double hashing")
|
|
28
|
+
|
|
29
|
+
# 5. Display interactive help manual
|
|
30
|
+
dsa_help()
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Available Functions
|
|
34
|
+
|
|
35
|
+
- `dsa_search()`: List all 48 available problems with their numerical IDs.
|
|
36
|
+
- `dsa_cpp(problem_num)`: Retrieve the C++ solution for problem number `problem_num` (1-48).
|
|
37
|
+
- `dsa_python(problem_num)`: Retrieve the Python solution for problem number `problem_num` (1-48).
|
|
38
|
+
- `dsa_mcq(search_query=None, limit=5)`: Fuzzy search across 79+ DSA Multiple Choice Questions by keyword/topic.
|
|
39
|
+
- `dsa_help()`: Displays comprehensive package help documentation.
|
|
40
|
+
|
|
41
|
+
*(Note: `pythontantra_search()`, `pythontantra_get()`, `pythontantra_mcq()`, and `pythontantra_help()` as well as legacy `codetantra_*` are also supported for backward compatibility).*
|
|
42
|
+
|
|
43
|
+
## Available Problems (1 - 48)
|
|
44
|
+
|
|
45
|
+
1. **Binary Search (Basic Iterative with Sorting)**
|
|
46
|
+
2. **Merge Sort (Basic)**
|
|
47
|
+
3. **Quick Sort (Basic)**
|
|
48
|
+
4. **Binary Search using Divide and Conquer**
|
|
49
|
+
5. **First and Last Occurrence of Element in a Sorted Array**
|
|
50
|
+
6. **Merge Sort with Recursion & Comparison Tracking**
|
|
51
|
+
7. **Inversion Pairs Count using Merge Sort**
|
|
52
|
+
8. **Quick Sort with Calls & Comparison Tracking**
|
|
53
|
+
9. **Contiguous Subarray with Largest Sum (Kadane's Algorithm)**
|
|
54
|
+
10. **Kth Largest Element in an Array (Min Heap)**
|
|
55
|
+
11. **Missing Number of the Sequence**
|
|
56
|
+
12. **Merge Sorted Array**
|
|
57
|
+
13. **Longest Binary Subarray after K Flips**
|
|
58
|
+
14. **Sorting by Set Bit Count using Divide and Conquer**
|
|
59
|
+
15. **Book Allocation with Minimum Maximum Load**
|
|
60
|
+
16. **Minimum Element in Rotated Sorted Array**
|
|
61
|
+
17. **Search in Rotated Sorted Array**
|
|
62
|
+
18. **Koko Eating Bananas**
|
|
63
|
+
19. **Single Number**
|
|
64
|
+
20. **Kth Missing Positive Number**
|
|
65
|
+
21. **Merge Two Sorted Linked Lists**
|
|
66
|
+
22. **Basic Hash Table Implementation**
|
|
67
|
+
23. **Hash Table with Double Hashing**
|
|
68
|
+
24. **Hash Table with Linear Probing**
|
|
69
|
+
25. **Hash Table with Quadratic Probing**
|
|
70
|
+
26. **Count Frequencies of Elements using Hashing**
|
|
71
|
+
27. **Check Nearby Duplicates using Hashing**
|
|
72
|
+
28. **Check for Pair with Given Sum using Hashing**
|
|
73
|
+
29. **Count Distinct Elements in Every Window of Size K**
|
|
74
|
+
30. **Top K Frequent Elements**
|
|
75
|
+
31. **Group Anagrams**
|
|
76
|
+
32. **Find Pair of Numbers with Target Sum**
|
|
77
|
+
33. **Hash Table with Separate Chaining**
|
|
78
|
+
34. **Maximum XOR Subarray with Hashing**
|
|
79
|
+
35. **Least K Elements**
|
|
80
|
+
36. **Count Distinct Elements in Every Window of Size K**
|
|
81
|
+
37. **Debugging Minimum Element using Divide and Conquer**
|
|
82
|
+
38. **Debugging Merge Sorted Array**
|
|
83
|
+
39. **Debugging Kth Smallest Element**
|
|
84
|
+
40. **Debugging Hash Table - Linear Probing**
|
|
85
|
+
41. **Quadratic Probing Technique**
|
|
86
|
+
42. **Linear Probing Technique**
|
|
87
|
+
43. **Strategic Battle**
|
|
88
|
+
44. **Maximum number of valid triplets**
|
|
89
|
+
45. **Hash Table using Open Hashing Separate Chaining**
|
|
90
|
+
46. **Longest Consecutive Number**
|
|
91
|
+
47. **First Non Repeating character**
|
|
92
|
+
48. **Intersection of two sorted Array**
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
from .algorithms import (
|
|
2
|
+
dsa_search,
|
|
3
|
+
dsa_cpp,
|
|
4
|
+
dsa_python,
|
|
5
|
+
dsa_mcq,
|
|
6
|
+
dsa_help,
|
|
7
|
+
pythontantra_search,
|
|
8
|
+
pythontantra_get,
|
|
9
|
+
pythontantra_mcq,
|
|
10
|
+
pythontantra_help,
|
|
11
|
+
codetantra_search,
|
|
12
|
+
codetantra_get,
|
|
13
|
+
codetantra_mcq,
|
|
14
|
+
codetantra_help,
|
|
15
|
+
get_binary_search_cpp,
|
|
16
|
+
get_quick_sort_cpp,
|
|
17
|
+
PROBLEMS
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__all__ = [
|
|
21
|
+
'dsa_search',
|
|
22
|
+
'dsa_cpp',
|
|
23
|
+
'dsa_python',
|
|
24
|
+
'dsa_mcq',
|
|
25
|
+
'dsa_help',
|
|
26
|
+
'pythontantra_search',
|
|
27
|
+
'pythontantra_get',
|
|
28
|
+
'pythontantra_mcq',
|
|
29
|
+
'pythontantra_help',
|
|
30
|
+
'codetantra_search',
|
|
31
|
+
'codetantra_get',
|
|
32
|
+
'codetantra_mcq',
|
|
33
|
+
'codetantra_help',
|
|
34
|
+
'get_binary_search_cpp',
|
|
35
|
+
'get_quick_sort_cpp',
|
|
36
|
+
'PROBLEMS'
|
|
37
|
+
]
|