pkstruct 0.1.2__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 (105) hide show
  1. {pkstruct-0.1.2 → pkstruct-0.1.3}/CHANGELOG.md +7 -0
  2. {pkstruct-0.1.2 → pkstruct-0.1.3}/MANIFEST.in +0 -3
  3. {pkstruct-0.1.2 → pkstruct-0.1.3}/PKG-INFO +21 -32
  4. {pkstruct-0.1.2 → pkstruct-0.1.3}/README.md +718 -727
  5. {pkstruct-0.1.2 → pkstruct-0.1.3}/pyproject.toml +2 -4
  6. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/__init__.py +2 -2
  7. pkstruct-0.1.2/.github/ISSUE_TEMPLATE/bug_report.md +0 -46
  8. pkstruct-0.1.2/.github/ISSUE_TEMPLATE/config.yml +0 -8
  9. pkstruct-0.1.2/.github/ISSUE_TEMPLATE/feature_request.md +0 -37
  10. pkstruct-0.1.2/.github/pull_request_template.md +0 -29
  11. pkstruct-0.1.2/CODE_OF_CONDUCT.md +0 -113
  12. pkstruct-0.1.2/CONTRIBUTING.md +0 -133
  13. pkstruct-0.1.2/MAINTAINERS.md +0 -62
  14. pkstruct-0.1.2/SECURITY.md +0 -20
  15. {pkstruct-0.1.2 → pkstruct-0.1.3}/.gitignore +0 -0
  16. {pkstruct-0.1.2 → pkstruct-0.1.3}/LICENSE +0 -0
  17. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/_display.py +0 -0
  18. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/_help.py +0 -0
  19. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/_linear_shortcuts.py +0 -0
  20. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/_str.py +0 -0
  21. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/_tree_shortcuts.py +0 -0
  22. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/__init__.py +0 -0
  23. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/connectivity.py +0 -0
  24. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/directed.py +0 -0
  25. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/exceptions.py +0 -0
  26. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/graph.py +0 -0
  27. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/mst.py +0 -0
  28. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/scc.py +0 -0
  29. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/shortest_path.py +0 -0
  30. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/tests/__init__.py +0 -0
  31. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/tests/test_graph.py +0 -0
  32. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/tests/test_graph_advanced.py +0 -0
  33. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/topo_sort.py +0 -0
  34. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/traversal.py +0 -0
  35. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/visualization.py +0 -0
  36. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/graphs/weighted.py +0 -0
  37. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/__init__.py +0 -0
  38. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/deques/__init__.py +0 -0
  39. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/deques/deque.py +0 -0
  40. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/deques/linked_deque.py +0 -0
  41. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/exceptions.py +0 -0
  42. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/__init__.py +0 -0
  43. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/_base.py +0 -0
  44. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/circular_linked_list.py +0 -0
  45. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/doubly_linked_list.py +0 -0
  46. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/nodes.py +0 -0
  47. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/linked_lists/singly_linked_list.py +0 -0
  48. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/queues/__init__.py +0 -0
  49. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/queues/circular_queue.py +0 -0
  50. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/queues/linked_queue.py +0 -0
  51. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/queues/priority_queue.py +0 -0
  52. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/queues/queue.py +0 -0
  53. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/__init__.py +0 -0
  54. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/array_stack.py +0 -0
  55. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/linked_stack.py +0 -0
  56. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/stacks/stack.py +0 -0
  57. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/tests/__init__.py +0 -0
  58. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/tests/test_edge_cases.py +0 -0
  59. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/tests/test_linked_list.py +0 -0
  60. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/tests/test_visualization.py +0 -0
  61. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/utils/__init__.py +0 -0
  62. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/utils/benchmark.py +0 -0
  63. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/utils/debug_tools.py +0 -0
  64. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/utils/helpers.py +0 -0
  65. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/utils/iterators.py +0 -0
  66. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/visualization/__init__.py +0 -0
  67. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/visualization/ascii_visualizer.py +0 -0
  68. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/linear/visualization/linked_list_visualizer.py +0 -0
  69. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/py.typed +0 -0
  70. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/__init__.py +0 -0
  71. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/benchmarking/__init__.py +0 -0
  72. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/debugging/__init__.py +0 -0
  73. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/exceptions/__init__.py +0 -0
  74. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/serializers/__init__.py +0 -0
  75. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/threading/__init__.py +0 -0
  76. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/validators/__init__.py +0 -0
  77. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/shared/visualization/__init__.py +0 -0
  78. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/__init__.py +0 -0
  79. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/avl.py +0 -0
  80. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/balancing.py +0 -0
  81. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/bplus.py +0 -0
  82. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/bst.py +0 -0
  83. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/btree.py +0 -0
  84. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/exceptions.py +0 -0
  85. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/fenwick_tree.py +0 -0
  86. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/interval_tree.py +0 -0
  87. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/node.py +0 -0
  88. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/red_black.py +0 -0
  89. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/segment_tree.py +0 -0
  90. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/__init__.py +0 -0
  91. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_avl.py +0 -0
  92. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_bplus.py +0 -0
  93. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_bst.py +0 -0
  94. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_btree.py +0 -0
  95. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_fenwick_tree.py +0 -0
  96. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_interval_tree.py +0 -0
  97. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_red_black.py +0 -0
  98. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tests/test_segment_tree.py +0 -0
  99. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/traversal.py +0 -0
  100. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/tree_helpers.py +0 -0
  101. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/utils/__init__.py +0 -0
  102. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/utils/complexity_helpers.py +0 -0
  103. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/visualization/__init__.py +0 -0
  104. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/visualization/ascii_renderer.py +0 -0
  105. {pkstruct-0.1.2 → pkstruct-0.1.3}/src/pkstruct/trees/visualization/tree_printer.py +0 -0
@@ -5,6 +5,13 @@ 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
+
8
15
  ## [0.1.2] - 2026-06-16
9
16
 
10
17
  ### Added
@@ -1,9 +1,6 @@
1
1
  include README.md
2
2
  include LICENSE
3
3
  include CHANGELOG.md
4
- include SECURITY.md
5
- include CODE_OF_CONDUCT.md
6
- include CONTRIBUTING.md
7
4
  recursive-include src/pkstruct *.py *.pyi
8
5
  global-exclude __pycache__
9
6
  global-exclude *.py[co]
@@ -1,12 +1,10 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pkstruct
3
- Version: 0.1.2
4
- Summary: A production-grade, open-source Python library providing comprehensive data structures and algorithms with type hints, thread safety, and extensive testing
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
5
  Project-URL: Homepage, https://github.com/prnvvv/pkstruct
6
6
  Project-URL: Repository, https://github.com/prnvvv/pkstruct
7
7
  Project-URL: Documentation, https://github.com/prnvvv/pkstruct#readme
8
- Project-URL: Bug Tracker, https://github.com/prnvvv/pkstruct/issues
9
- Author: pkstruct Contributors
10
8
  Author-email: Prannavakhanth <prannavakhanth12@gmail.com>, Priyanka Kaliraj <pri2303k@gmail.com>
11
9
  License: MIT License
12
10
 
@@ -63,7 +61,7 @@ Description-Content-Type: text/markdown
63
61
 
64
62
  # pkstruct
65
63
 
66
- **A production-grade, open-source Python library providing comprehensive data structures and algorithms with type hints, thread safety, and extensive testing.**
64
+ **A production-grade Python library providing comprehensive data structures and algorithms with type hints, thread safety, and extensive testing.**
67
65
 
68
66
  [![PyPI](https://img.shields.io/pypi/v/pkstruct)](https://pypi.org/project/pkstruct/)
69
67
  [![Python](https://img.shields.io/pypi/pyversions/pkstruct)](https://pypi.org/project/pkstruct/)
@@ -81,7 +79,7 @@ Description-Content-Type: text/markdown
81
79
  | Need | pkstruct gives you |
82
80
  |------|-------------------|
83
81
  | **Interview prep** | Linked lists, trees, graphs with LeetCode-style helpers (palindrome, cycle detection, LCA, topological sort, etc.) |
84
- | **Production code** | Thread-safe structures (`threading.RLock`), strict type hints, 898+ tests |
82
+ | **Production code** | Thread-safe structures (`threading.RLock`), strict type hints, 899+ tests |
85
83
  | **Learning DSA** | Consistent API across all structures, built-in ASCII visualization, runtime help system |
86
84
  | **Competitive programming** | Drop-in collection of trees (BST, AVL, Red-Black, Fenwick, Segment, Interval) and graph algorithms (Dijkstra, Kruskal, Tarjan, etc.) |
87
85
 
@@ -301,7 +299,7 @@ ArrayStack().daily_temperatures([73, 74, 75]) # [1, 1, 0]
301
299
  q = LinkedQueue([1, 2, 3])
302
300
  q.enqueue(4)
303
301
  q.dequeue() # 1
304
- q.peek() # 2
302
+ q.front() # 2
305
303
 
306
304
  # LeetCode extras
307
305
  LinkedQueue().sliding_window_maximum([1,3,-1,-3,5,3,6,7], 3) # [3,3,5,5,6,7]
@@ -314,9 +312,9 @@ cq.dequeue() # 1
314
312
 
315
313
  # ── Priority Queue (min-heap) ──
316
314
  pq = PriorityQueue()
317
- pq.push("task1", priority=3)
318
- pq.push("task2", priority=1)
319
- pq.pop() # "task2"
315
+ pq.enqueue("task1", priority=3)
316
+ pq.enqueue("task2", priority=1)
317
+ pq.dequeue() # "task2"
320
318
 
321
319
  # LeetCode extras
322
320
  PriorityQueue().kth_largest([3,2,1,5,6,4], 2) # 5
@@ -325,10 +323,10 @@ PriorityQueue().top_k_frequent([1,1,1,2,2,3], 2) # [1, 2]
325
323
  # ── Deque ──
326
324
  d = LinkedDeque([1, 2, 3])
327
325
  d.append(4)
328
- d.appendleft(0)
329
- d.pop() # 4
330
- d.popleft() # 0
331
- 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
332
330
  ```
333
331
 
334
332
  ### Linear — Utilities
@@ -375,17 +373,17 @@ run_full_benchmark() # full suite
375
373
  bst = BinarySearchTree()
376
374
  bst.insert(10, value="ten")
377
375
  bst.insert(5, value="five")
378
- bst[5] # "five" (via __getitem__)
379
376
  bst.search(10) # ("ten", Node)
380
377
  bst.delete(5)
381
378
  len(bst) # 1
382
379
 
383
- # Traversals
384
- list(bst.inorder()) # [5, 10, 15]
385
- list(bst.preorder()) # [10, 5, 15]
386
- list(bst.postorder()) # [5, 15, 10]
387
- list(bst.level_order()) # [10, 5, 15]
388
- 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]
389
387
 
390
388
  # Navigation Shortcuts
391
389
  bst.root # root node
@@ -496,6 +494,7 @@ from pkstruct.trees.tree_helpers import (
496
494
  validate_bst_order, path_to_node,
497
495
  level_of_node, max_width,
498
496
  )
497
+ from pkstruct.trees.node import TreeNode
499
498
 
500
499
  # Traversal functions (work on any binary tree root)
501
500
  bst = BinarySearchTree()
@@ -746,16 +745,6 @@ run_full_benchmark()
746
745
 
747
746
  ---
748
747
 
749
- ## 🤝 Contributing
750
-
751
- We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) to get started.
752
-
753
- - [Code of Conduct](CODE_OF_CONDUCT.md)
754
- - [Issue Tracker](https://github.com/prnvvv/pkstruct/issues)
755
- - [Feature Requests](https://github.com/prnvvv/pkstruct/issues/new?template=feature_request.md)
756
-
757
- ---
758
-
759
748
  ## 🔧 Development
760
749
 
761
750
  ```bash
@@ -778,7 +767,7 @@ ruff check src/pkstruct
778
767
 
779
768
  ## 📄 License
780
769
 
781
- MIT © pkstruct Contributors
770
+ MIT © Prannavakhanth & Priyanka Kaliraj
782
771
 
783
772
  ## 🙌 Credits
784
773