Skip to content

Conversation

@rajucreate
Copy link

@rajucreate rajucreate commented Oct 17, 2025

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

Updated the documentation for the generic Linear Search method by adding a detailed explanation of the Comparable interface. This helps new or unfamiliar programmers better understand the purpose of generics and how compareTo() is used in comparisons.
### Summary
Added Javadoc documentation to explain the role of the Comparable interface in LinearSearch.

### Details
- Clarifies how `<T extends Comparable<T>>` ensures type safety.
- Explains how compareTo() is used to compare elements in the array.
- Enhances understanding for beginners learning generics and comparison logic.

### Type of Change
- [x] Documentation update
@rajucreate rajucreate closed this Oct 17, 2025
@rajucreate rajucreate deleted the revert-1-docs-linearsearch-comparable branch October 17, 2025 10:58
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.85%. Comparing base (4858ec9) to head (e258943).

Additional details and impacted files
@@            Coverage Diff            @@
##             master    #6815   +/-   ##
=========================================
  Coverage     77.85%   77.85%           
  Complexity     6359     6359           
=========================================
  Files           731      731           
  Lines         21187    21187           
  Branches       4140     4140           
=========================================
  Hits          16495    16495           
  Misses         4034     4034           
  Partials        658      658           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

2 participants