pkstruct 0.1.1__tar.gz → 0.1.3__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.
Files changed (100) hide show
  1. {pkstruct-0.1.1 → pkstruct-0.1.3}/.gitignore +2 -1
  2. {pkstruct-0.1.1 → pkstruct-0.1.3}/CHANGELOG.md +23 -0
  3. {pkstruct-0.1.1 → pkstruct-0.1.3}/MANIFEST.in +0 -1
  4. {pkstruct-0.1.1 → pkstruct-0.1.3}/PKG-INFO +47 -35
  5. {pkstruct-0.1.1 → pkstruct-0.1.3}/README.md +718 -707
  6. {pkstruct-0.1.1 → pkstruct-0.1.3}/pyproject.toml +20 -8
  7. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/__init__.py +2 -2
  8. pkstruct-0.1.1/AGENTS.md +0 -38
  9. pkstruct-0.1.1/SECURITY.md +0 -20
  10. pkstruct-0.1.1/requirements-dev.txt +0 -9
  11. {pkstruct-0.1.1 → pkstruct-0.1.3}/LICENSE +0 -0
  12. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/_display.py +0 -0
  13. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/_help.py +0 -0
  14. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/_linear_shortcuts.py +0 -0
  15. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/_str.py +0 -0
  16. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/_tree_shortcuts.py +0 -0
  17. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/__init__.py +0 -0
  18. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/connectivity.py +0 -0
  19. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/directed.py +0 -0
  20. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/exceptions.py +0 -0
  21. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/graph.py +0 -0
  22. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/mst.py +0 -0
  23. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/scc.py +0 -0
  24. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/shortest_path.py +0 -0
  25. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/tests/__init__.py +0 -0
  26. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/tests/test_graph.py +0 -0
  27. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/tests/test_graph_advanced.py +0 -0
  28. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/topo_sort.py +0 -0
  29. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/traversal.py +0 -0
  30. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/visualization.py +0 -0
  31. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/graphs/weighted.py +0 -0
  32. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/__init__.py +0 -0
  33. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/deques/__init__.py +0 -0
  34. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/deques/deque.py +0 -0
  35. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/deques/linked_deque.py +0 -0
  36. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/exceptions.py +0 -0
  37. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/__init__.py +0 -0
  38. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/_base.py +0 -0
  39. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/circular_linked_list.py +0 -0
  40. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/doubly_linked_list.py +0 -0
  41. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/nodes.py +0 -0
  42. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/singly_linked_list.py +0 -0
  43. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/queues/__init__.py +0 -0
  44. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/queues/circular_queue.py +0 -0
  45. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/queues/linked_queue.py +0 -0
  46. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/queues/priority_queue.py +0 -0
  47. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/queues/queue.py +0 -0
  48. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/__init__.py +0 -0
  49. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/array_stack.py +0 -0
  50. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/linked_stack.py +0 -0
  51. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/stack.py +0 -0
  52. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/tests/__init__.py +0 -0
  53. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/tests/test_edge_cases.py +0 -0
  54. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/tests/test_linked_list.py +0 -0
  55. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/tests/test_visualization.py +0 -0
  56. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/utils/__init__.py +0 -0
  57. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/utils/benchmark.py +0 -0
  58. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/utils/debug_tools.py +0 -0
  59. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/utils/helpers.py +0 -0
  60. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/utils/iterators.py +0 -0
  61. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/visualization/__init__.py +0 -0
  62. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/visualization/ascii_visualizer.py +0 -0
  63. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/linear/visualization/linked_list_visualizer.py +0 -0
  64. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/py.typed +0 -0
  65. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/__init__.py +0 -0
  66. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/benchmarking/__init__.py +0 -0
  67. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/debugging/__init__.py +0 -0
  68. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/exceptions/__init__.py +0 -0
  69. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/serializers/__init__.py +0 -0
  70. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/threading/__init__.py +0 -0
  71. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/validators/__init__.py +0 -0
  72. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/shared/visualization/__init__.py +0 -0
  73. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/__init__.py +0 -0
  74. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/avl.py +0 -0
  75. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/balancing.py +0 -0
  76. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/bplus.py +0 -0
  77. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/bst.py +0 -0
  78. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/btree.py +0 -0
  79. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/exceptions.py +0 -0
  80. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/fenwick_tree.py +0 -0
  81. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/interval_tree.py +0 -0
  82. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/node.py +0 -0
  83. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/red_black.py +0 -0
  84. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/segment_tree.py +0 -0
  85. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/__init__.py +0 -0
  86. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_avl.py +0 -0
  87. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_bplus.py +0 -0
  88. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_bst.py +0 -0
  89. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_btree.py +0 -0
  90. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_fenwick_tree.py +0 -0
  91. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_interval_tree.py +0 -0
  92. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_red_black.py +0 -0
  93. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_segment_tree.py +0 -0
  94. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/traversal.py +0 -0
  95. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/tree_helpers.py +0 -0
  96. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/utils/__init__.py +0 -0
  97. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/utils/complexity_helpers.py +0 -0
  98. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/visualization/__init__.py +0 -0
  99. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/visualization/ascii_renderer.py +0 -0
  100. {pkstruct-0.1.1 → pkstruct-0.1.3}/src/pkstruct/trees/visualization/tree_printer.py +0 -0
@@ -212,6 +212,7 @@ PKSTRUCT-INFO
212
212
  # Development artifacts
213
213
  # ==========================================
214
214
  *.history
215
+ AGENTS.md
216
+ requirements-dev.txt
215
217
 
216
- .github/
217
218
  .gitlab-ci.yml
@@ -5,6 +5,29 @@ All notable changes to pkstruct will be documented in this file.
5
5
  The format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.1.3] - 2026-06-16
9
+
10
+ ### Fixed
11
+ - README PriorityQueue examples corrected: `push()`/`pop()` → `enqueue()`/`dequeue()`
12
+ - README BST traversal examples corrected: use `pkstruct.trees.traversal` module, `zigzag` → `zigzag_order`
13
+ - `__version__` bumped to 0.1.3
14
+
15
+ ## [0.1.2] - 2026-06-16
16
+
17
+ ### Added
18
+ - CONTRIBUTING.md, CODE_OF_CONDUCT.md, MAINTAINERS.md with project governance
19
+ - Issue templates (bug report, feature request) and PR template
20
+ - `py.typed` marker already present for PEP 561 compliance
21
+
22
+ ### Changed
23
+ - README restructured: added "Why pkstruct?" section, removed maintainer-only publishing docs
24
+ - pyproject.toml: updated author list with founders, expanded keywords, added classifiers
25
+ - Badge URLs fixed to match `prnvvv/pkstruct` repository
26
+
27
+ ### Removed
28
+ - AGENTS.md and requirements-dev.txt removed from repository (gitignored)
29
+ - .github/ removed from .gitignore so templates are tracked
30
+
8
31
  ## [0.1.1] - 2026-06-02
9
32
 
10
33
  ### Added
@@ -1,7 +1,6 @@
1
1
  include README.md
2
2
  include LICENSE
3
3
  include CHANGELOG.md
4
- include SECURITY.md
5
4
  recursive-include src/pkstruct *.py *.pyi
6
5
  global-exclude __pycache__
7
6
  global-exclude *.py[co]
@@ -1,12 +1,11 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkstruct
3
- Version: 0.1.1
4
- Summary: Industrial-grade data structures and algorithms toolkit for Python
5
- Project-URL: Homepage, https://github.com/pkstruct/pkstruct
6
- Project-URL: Repository, https://github.com/pkstruct/pkstruct
7
- Project-URL: Documentation, https://pkstruct.readthedocs.io
8
- Project-URL: Bug Tracker, https://github.com/pkstruct/pkstruct/issues
9
- Author: pkstruct Contributors
3
+ Version: 0.1.3
4
+ Summary: A production-grade Python library providing comprehensive data structures and algorithms with type hints, thread safety, and extensive testing
5
+ Project-URL: Homepage, https://github.com/prnvvv/pkstruct
6
+ Project-URL: Repository, https://github.com/prnvvv/pkstruct
7
+ Project-URL: Documentation, https://github.com/prnvvv/pkstruct#readme
8
+ Author-email: Prannavakhanth <prannavakhanth12@gmail.com>, Priyanka Kaliraj <pri2303k@gmail.com>
10
9
  License: MIT License
11
10
 
12
11
  Copyright (c) 2026 Prannavakhanth
@@ -29,11 +28,13 @@ License: MIT License
29
28
  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
29
  SOFTWARE.
31
30
  License-File: LICENSE
32
- Keywords: algorithms,collections,data-structures,dsa,linked-list
31
+ Keywords: algorithms,avl-tree,b-tree,binary-search-tree,bplus-tree,collections,competitive-programming,data-structures,deque,dsa,fenwick-tree,graph,graph-algorithms,interval-tree,interview,linked-list,queue,red-black-tree,segment-tree,stack,tree
33
32
  Classifier: Development Status :: 5 - Production/Stable
34
33
  Classifier: Intended Audience :: Developers
35
34
  Classifier: Intended Audience :: Education
36
35
  Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Natural Language :: English
37
+ Classifier: Operating System :: OS Independent
37
38
  Classifier: Programming Language :: Python :: 3
38
39
  Classifier: Programming Language :: Python :: 3.10
39
40
  Classifier: Programming Language :: Python :: 3.11
@@ -60,12 +61,12 @@ Description-Content-Type: text/markdown
60
61
 
61
62
  # pkstruct
62
63
 
63
- **Industrial-grade data structures and algorithms for Python 3.10**
64
+ **A production-grade Python library providing comprehensive data structures and algorithms with type hints, thread safety, and extensive testing.**
64
65
 
65
66
  [![PyPI](https://img.shields.io/pypi/v/pkstruct)](https://pypi.org/project/pkstruct/)
66
67
  [![Python](https://img.shields.io/pypi/pyversions/pkstruct)](https://pypi.org/project/pkstruct/)
67
68
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
68
- [![Tests](https://img.shields.io/badge/tests-898_✔️-success)](https://github.com/anomalyco/pkstruct)
69
+ [![Tests](https://img.shields.io/badge/tests-899_✔️-success)](https://github.com/prnvvv/pkstruct)
69
70
  [![Type Checked](https://img.shields.io/badge/mypy-strict-blue)](https://github.com/python/mypy)
70
71
  [![Code Style](https://img.shields.io/badge/code%20style-ruff-000000)](https://github.com/astral-sh/ruff)
71
72
 
@@ -73,6 +74,15 @@ Description-Content-Type: text/markdown
73
74
 
74
75
  ---
75
76
 
77
+ ## Why pkstruct?
78
+
79
+ | Need | pkstruct gives you |
80
+ |------|-------------------|
81
+ | **Interview prep** | Linked lists, trees, graphs with LeetCode-style helpers (palindrome, cycle detection, LCA, topological sort, etc.) |
82
+ | **Production code** | Thread-safe structures (`threading.RLock`), strict type hints, 899+ tests |
83
+ | **Learning DSA** | Consistent API across all structures, built-in ASCII visualization, runtime help system |
84
+ | **Competitive programming** | Drop-in collection of trees (BST, AVL, Red-Black, Fenwick, Segment, Interval) and graph algorithms (Dijkstra, Kruskal, Tarjan, etc.) |
85
+
76
86
  ## 📦 Installation
77
87
 
78
88
  ```bash
@@ -289,7 +299,7 @@ ArrayStack().daily_temperatures([73, 74, 75]) # [1, 1, 0]
289
299
  q = LinkedQueue([1, 2, 3])
290
300
  q.enqueue(4)
291
301
  q.dequeue() # 1
292
- q.peek() # 2
302
+ q.front() # 2
293
303
 
294
304
  # LeetCode extras
295
305
  LinkedQueue().sliding_window_maximum([1,3,-1,-3,5,3,6,7], 3) # [3,3,5,5,6,7]
@@ -302,9 +312,9 @@ cq.dequeue() # 1
302
312
 
303
313
  # ── Priority Queue (min-heap) ──
304
314
  pq = PriorityQueue()
305
- pq.push("task1", priority=3)
306
- pq.push("task2", priority=1)
307
- pq.pop() # "task2"
315
+ pq.enqueue("task1", priority=3)
316
+ pq.enqueue("task2", priority=1)
317
+ pq.dequeue() # "task2"
308
318
 
309
319
  # LeetCode extras
310
320
  PriorityQueue().kth_largest([3,2,1,5,6,4], 2) # 5
@@ -313,10 +323,10 @@ PriorityQueue().top_k_frequent([1,1,1,2,2,3], 2) # [1, 2]
313
323
  # ── Deque ──
314
324
  d = LinkedDeque([1, 2, 3])
315
325
  d.append(4)
316
- d.appendleft(0)
317
- d.pop() # 4
318
- d.popleft() # 0
319
- d.rotate(2) # rotate right by 2
326
+ d.append(0, side="left") # append to left side
327
+ d.pop() # 4 (from right)
328
+ d.pop(side="left") # 0 (from left)
329
+ d.rotate(2) # rotate right by 2
320
330
  ```
321
331
 
322
332
  ### Linear — Utilities
@@ -363,17 +373,17 @@ run_full_benchmark() # full suite
363
373
  bst = BinarySearchTree()
364
374
  bst.insert(10, value="ten")
365
375
  bst.insert(5, value="five")
366
- bst[5] # "five" (via __getitem__)
367
376
  bst.search(10) # ("ten", Node)
368
377
  bst.delete(5)
369
378
  len(bst) # 1
370
379
 
371
- # Traversals
372
- list(bst.inorder()) # [5, 10, 15]
373
- list(bst.preorder()) # [10, 5, 15]
374
- list(bst.postorder()) # [5, 15, 10]
375
- list(bst.level_order()) # [10, 5, 15]
376
- list(bst.zigzag()) # [10, 15, 5]
380
+ # Traversals (via standalone functions)
381
+ from pkstruct.trees.traversal import inorder, preorder, postorder, levelorder
382
+ list(inorder(bst.root)) # [5, 10, 15]
383
+ list(preorder(bst.root)) # [10, 5, 15]
384
+ list(postorder(bst.root)) # [5, 15, 10]
385
+ list(levelorder(bst.root)) # [10, 5, 15]
386
+ list(bst.zigzag_order()) # [10, 15, 5]
377
387
 
378
388
  # Navigation Shortcuts
379
389
  bst.root # root node
@@ -484,6 +494,7 @@ from pkstruct.trees.tree_helpers import (
484
494
  validate_bst_order, path_to_node,
485
495
  level_of_node, max_width,
486
496
  )
497
+ from pkstruct.trees.node import TreeNode
487
498
 
488
499
  # Traversal functions (work on any binary tree root)
489
500
  bst = BinarySearchTree()
@@ -738,11 +749,11 @@ run_full_benchmark()
738
749
 
739
750
  ```bash
740
751
  # Clone and install
741
- git clone https://github.com/anomalyco/pkstruct.git
752
+ git clone https://github.com/prnvvv/pkstruct.git
742
753
  cd pkstruct
743
754
  pip install -e ".[dev]"
744
755
 
745
- # Run tests (898 tests)
756
+ # Run tests (899 tests)
746
757
  pytest -v
747
758
 
748
759
  # Type check
@@ -752,14 +763,15 @@ mypy src/pkstruct
752
763
  ruff check src/pkstruct
753
764
  ```
754
765
 
755
- ## 📦 Publishing
756
-
757
- ```bash
758
- python -m build
759
- twine check dist/*
760
- twine upload dist/*
761
- ```
766
+ ---
762
767
 
763
768
  ## 📄 License
764
769
 
765
- MIT © pkstruct Contributors
770
+ MIT © Prannavakhanth & Priyanka Kaliraj
771
+
772
+ ## 🙌 Credits
773
+
774
+ pkstruct is created and maintained by:
775
+
776
+ - **Prannavakhanth** ([@prnvvv](https://github.com/prnvvv)) — Founder & Lead Maintainer
777
+ - **Priyanka Kaliraj** ([@pri-23-k](https://github.com/pri-23-k)) — Co-Founder & Maintainer