Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pull request #2 from 20pa5a1210/Arrays #3

Merged
merged 1 commit into from
May 26, 2023
Merged

Merge pull request #2 from 20pa5a1210/Arrays #3

merged 1 commit into from
May 26, 2023

Conversation

SudoSurya
Copy link
Owner

Arrays Branch - Sliding Window Technique Implementation

This pull request from the "arrays" branch introduces the implementation of the sliding window technique in Java. It includes a new SlidingWindow class with methods for solving array problems efficiently. The maximumSumSubarray function finds the subarray with the maximum sum using the sliding window technique, while the minimumSizeSubarraySum function determines the minimum length of a subarray with a sum greater than or equal to a given target value. Unit tests ensure the correctness of the implementation. These changes enhance the array manipulation code, providing optimized solutions for array-related problems

@SudoSurya SudoSurya added the documentation Improvements or additions to documentation label May 25, 2023
@SudoSurya SudoSurya self-assigned this May 25, 2023
@SudoSurya
Copy link
Owner Author

Two Pointers Technique Implementation

Two pointers is a more general version of sliding window where the pointers can cross each other and can be on different array
When you are given two arrays to process, it is common to have one index per array (pointer) to traverse/compare the both of them, incrementing one of the pointers when relevant. For example, we use this approach to merge two sorted arrays.

@SudoSurya SudoSurya merged commit b63619a into Arrays May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant