Newbranch2
- [x] I have read CONTRIBUTING.md.
- [x] This pull request is all my own work -- I have not plagiarized it.
- [x] All filenames are in PascalCase.
- [x] All functions and variable names follow Java naming conventions.
- [x] All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
- [x] All new code is formatted with
clang-format -i --style=file path/to/your/file.java
Codecov Report
Attention: Patch coverage is 70.58824% with 5 lines in your changes missing coverage. Please review.
Project coverage is 72.40%. Comparing base (
5e9d1dc) to head (8108252).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...slidingwindow/SubarraysWithKDifferentIntegers.java | 70.58% | 4 Missing and 1 partial :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #6049 +/- ##
============================================
+ Coverage 72.38% 72.40% +0.01%
- Complexity 4982 4988 +6
============================================
Files 653 654 +1
Lines 17574 17591 +17
Branches 3386 3390 +4
============================================
+ Hits 12721 12736 +15
- Misses 4372 4375 +3
+ Partials 481 480 -1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This pull request adds the SubarraysWithKDifferentIntegers algorithm to the sliding window section. The algorithm efficiently calculates the number of subarrays with exactly k different integers using a sliding window approach.Test have been also added for the same.
We don't add leetcode problems
ok