Skip to content

Refactor LCA Euler Tour: cleanup, bazel docs, expand tests#1262

Merged
williamfiset merged 1 commit intomasterfrom
refactor-lca-euler-tour
Mar 7, 2026
Merged

Refactor LCA Euler Tour: cleanup, bazel docs, expand tests#1262
williamfiset merged 1 commit intomasterfrom
refactor-lca-euler-tour

Conversation

@williamfiset
Copy link
Owner

Summary

  • Replace gradle run instructions with bazel test command in javadoc
  • Move main method to bottom, TreeNode class to top for better readability
  • Replace System.out.println warning in rootTree with IllegalArgumentException for malformed graphs
  • Replace LinkedList with ArrayList for children lists and adjacency lists
  • Expand test suite from 4 to 12 tests covering symmetry, root ancestry, parent-child LCA, edge cases (single/two node trees, linear chains), TreeNode properties, and malformed graph detection

Test plan

  • All 12 tests pass via bazel test
  • Existing randomized cross-validation test against LowestCommonAncestor unchanged and passing
  • New tests cover edge cases and structural properties of LCA

🤖 Generated with Claude Code

- Replace gradle run instructions with bazel test command in javadoc
- Move main method to bottom of class
- Move TreeNode class to top for better readability
- Replace System.out warning in rootTree with IllegalArgumentException
- Replace LinkedList with ArrayList for children and adjacency lists
- Rename createFirstTreeFromSlides to createSampleTree
- Expand tests from 4 to 12 covering symmetry, root ancestry,
  parent-child LCA, single/two node trees, linear chains,
  TreeNode properties, and malformed graph detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@williamfiset williamfiset merged commit 3313b18 into master Mar 7, 2026
1 of 2 checks passed
@williamfiset williamfiset deleted the refactor-lca-euler-tour branch March 7, 2026 05:19
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.

1 participant