[pull] master from williamfiset:master#120
Merged
pull[bot] merged 7 commits intoUncodedtech:masterfrom Mar 7, 2026
Merged
Conversation
…#1256) - Fix NPE in iterator when tree is empty (ArrayDeque rejects null) - Replace deprecated java.util.Stack with ArrayDeque in iterator - Add null guard in public contains() method - Fix typo: validateBSTInvarient -> validateBSTInvariant - Expand test suite from 10 to 31 tests covering edge cases, removal scenarios, iterator behavior, and invariant validation Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
#1255) * Refactor RedBlackTree: encapsulate Node fields, standardize naming, and expand tests (#1255) - Encapsulate Node fields (color, value, left, right, parent) with private access and provide getters/setters - Standardize variable naming conventions (camelCase) - Unified search logic in contains() - Remove unused methods: updateParentChildLink, findMin, findMax, swapColors - Expand RedBlackTreeTest to include comprehensive invariant verification: - Root and NIL node color checks - Red-node property (red nodes must have black children) - Black-height property (consistent black nodes on all paths to NIL) - Integrated invariant verification into randomized stress tests * Simplify RedBlackTree implementation: consolidate symmetric cases and rotations * Use more descriptive variable names in RedBlackTree for better readability * Further simplify RedBlackTree: use public Node fields to match project style
- Make N field private in both FenwickTree classes - Add proper import for java.util.Arrays, fix misleading constructor comment - Add input validation: negative size, out-of-range indices in sum() - Add size() method to FenwickTreeRangeQueryPointUpdate - Remove commented-out debug prints and dead assertions in tests - Expand RangeQueryPointUpdate tests from 7 to 14 - Expand RangeUpdatePointQuery tests from 6 to 10 Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
…age (#1258) * Cleanup and simplify hashtable implementations and improve test coverage * Restore educational comments and update .gemini.md
…1257) (#1261) - Standardize variable naming to camelCase (removedData, elemI, elemJ) - Add null checks in constructors and add/contains/remove methods - Expand test suite to cover: - Empty heap peek/poll behavior - Null input handling for all public methods - Constructor validation for arrays and collections with null elements - toString representation - Preserve all educational comments
* Cleanup DoublyLinkedList and expand test coverage - Add proper import for java.util.Iterator instead of inline qualified names - Change addAt to throw IndexOutOfBoundsException instead of checked Exception - Remove pointless local variable assignments in clear() and remove(Node) - Move trav declaration to point of use in remove(Object) - Replace inline java.util imports with proper imports in tests - Expand test suite from 18 to 30 tests covering contains, indexOf, null handling, invalid indices, iterator, and forEach Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * Disallow null elements in DoublyLinkedList - Reject null in addFirst/addLast with IllegalArgumentException - Simplify remove(Object) and indexOf(Object) by removing null branches - Replace null-related tests with testNullRejection - Remove null entries from randomized test data generators Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )