JavaScript icon indicating copy to clipboard operation
JavaScript copied to clipboard

Implement sliding window algorithms for fixed and dynamic sizes with tests

Open Kesavan-77 opened this issue 1 year ago • 3 comments

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.

Kesavan-77 avatar Nov 05 '24 17:11 Kesavan-77