Skip to content

Add data structure tests (62 new), fix README coin_change example#2743

Merged
keon merged 3 commits intomainfrom
fix/add-ds-tests-readme
Mar 13, 2026
Merged

Add data structure tests (62 new), fix README coin_change example#2743
keon merged 3 commits intomainfrom
fix/add-ds-tests-readme

Conversation

@keon
Copy link
Copy Markdown
Owner

@keon keon commented Mar 12, 2026

Summary

Test plan

  • python -m pytest tests/test_data_structures.py -v — 62 tests pass
  • README example matches actual module export
  • Total test count increased from 525 to 587

Closes #2727, #2738

🤖 Generated with Claude Code

keon and others added 3 commits March 12, 2026 11:09
- Create tests/test_data_structures.py with 62 tests covering
  red-black tree, AVL tree, trie, union-find, segment tree,
  hash table, separate chaining hash table, stack, and queue (#2727)
- Fix README Quick Start coin_change example to use correct
  function name `count` matching the actual export (#2738)

Closes #2727, closes #2738

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix avl_tree.py: .key -> .val to match TreeNode dataclass
- Add test_in_order_traverse_populated to catch this regression
- Remove duplicate stack/queue tests already covered in test_stack.py
  and test_queue.py

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@keon keon merged commit 9f1446c into main Mar 13, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add tests/test_data_structures.py — 14 of 20 data structures have zero test coverage

1 participant