Skip to content

Shortest coprime segment using sliding window technique#6296

Merged
DenizAltunkapan merged 6 commits into
TheAlgorithms:masterfrom
DomTr:sliding-window-gcd
Jun 18, 2025
Merged

Shortest coprime segment using sliding window technique#6296
DenizAltunkapan merged 6 commits into
TheAlgorithms:masterfrom
DomTr:sliding-window-gcd

Conversation

@DomTr

@DomTr DomTr commented Jun 17, 2025

Copy link
Copy Markdown
Contributor
  • 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

@codecov-commenter

codecov-commenter commented Jun 17, 2025

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 74.14%. Comparing base (a21abe6) to head (8bcd7db).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6296      +/-   ##
============================================
+ Coverage     74.10%   74.14%   +0.03%     
- Complexity     5345     5359      +14     
============================================
  Files           677      678       +1     
  Lines         18639    18686      +47     
  Branches       3618     3625       +7     
============================================
+ Hits          13812    13854      +42     
- Misses         4272     4274       +2     
- Partials        555      558       +3     

☔ 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.

@DenizAltunkapan DenizAltunkapan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please fix the failing build pipeline

@siriak siriak requested a review from DenizAltunkapan June 18, 2025 12:45
Comment thread src/main/java/com/thealgorithms/slidingwindow/ShortestCoprimeSegment.java Outdated
Comment thread src/main/java/com/thealgorithms/slidingwindow/ShortestCoprimeSegment.java Outdated
Comment thread src/main/java/com/thealgorithms/slidingwindow/ShortestCoprimeSegment.java Outdated
Comment thread src/main/java/com/thealgorithms/slidingwindow/ShortestCoprimeSegment.java Outdated

@DenizAltunkapan DenizAltunkapan left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks very good!

@DenizAltunkapan DenizAltunkapan merged commit 616d15a into TheAlgorithms:master Jun 18, 2025
7 checks passed
@DomTr DomTr deleted the sliding-window-gcd branch June 20, 2025 15:18
vil02 pushed a commit to vil02/Java that referenced this pull request Jul 2, 2025
…s#6296)

* Shortest coprime segment using sliding window technique

* mvn checkstyle passes

* gcd function reformatted

* fixed typo in ShortestCoprimeSegment

* 1. shortestCoprimeSegment now returns not the length, but the shortest segment itself.
2. Testcases have been adapted, a few new ones added.

* clang formatted ShortestCoprimeSegmentTest.java code
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.

4 participants