Skip to content

Implement sliding window algorithms for fixed and dynamic sizes with tests - #1765

Merged
raklaptudirm merged 2 commits into
TheAlgorithms:masterfrom
Kesavan-77:master
Sep 4, 2025
Merged

Implement sliding window algorithms for fixed and dynamic sizes with tests#1765
raklaptudirm merged 2 commits into
TheAlgorithms:masterfrom
Kesavan-77:master

Conversation

@Kesavan-77

Copy link
Copy Markdown
Contributor

Sliding Windows Algorithm

  • Added maxSumSubarrayFixed function to calculate the maximum sum of a fixed-size subarray.
  • Added longestSubarrayWithSumAtMost function to find the longest subarray with a sum less than or equal to a given target.
  • Included tests for both functions to ensure correctness and edge case handling.
  • Updated documentation to reflect the new implementations.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.80%. Comparing base (55ff0ad) to head (a3c5ac0).

Additional details and impacted files
@@ Coverage Diff @@## master #1765 +/- ##
==========================================
+ Coverage 84.76% 84.80% +0.03% 
==========================================
Files 378 380 +2 Lines 19738 19785 +47 Branches 2957 2965 +8 ==========================================
+ Hits 16731 16778 +47 
Misses 3007 3007 

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

@Kesavan-77

Copy link
Copy Markdown
ContributorAuthor

@raklaptudirm , @appgurueu kindly check the above PR for merging.

@Kesavan-77

Copy link
Copy Markdown
ContributorAuthor

Kindly merge the above PR @raklaptudirm and @appgurueu

@raklaptudirm
raklaptudirm merged commit 3f52add into TheAlgorithms:masterSep 4, 2025
Sign up for freeto 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.

5 participants

@Kesavan-77@codecov-commenter@pertrai1@anandfresh@raklaptudirm