Skip to content

[pull] master from williamfiset:master#120

Merged
pull[bot] merged 7 commits intoUncodedtech:masterfrom
williamfiset:master
Mar 7, 2026
Merged

[pull] master from williamfiset:master#120
pull[bot] merged 7 commits intoUncodedtech:masterfrom
williamfiset:master

Conversation

@pull
Copy link

@pull pull bot commented Mar 7, 2026

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 : )

williamfiset and others added 7 commits March 6, 2026 18:03
…#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>
@pull pull bot locked and limited conversation to collaborators Mar 7, 2026
@pull pull bot added the ⤵️ pull label Mar 7, 2026
@pull pull bot merged commit be9ea81 into Uncodedtech:master Mar 7, 2026
1 of 4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant