Array

Level: Advanced

1. Implement a function to find the maximum sum of a subarray with at most k changes allowed.
2. Write a function to find the minimum length of a subarray with a given sum.
3. Implement a function to find the maximum length of a subarray with the sum of elements divisible by k.
4. Write a function to find the maximum sum of a subarray with at most k negative numbers allowed.
5. Implement a function to find the maximum length of a subarray with the sum of elements equal to a given value and at most k negative numbers allowed.
6. Write a function to find the minimum sum of a subarray with a given length.
7. Implement a function to find the maximum product of a subarray with at most k negative numbers allowed.
8. Write a function to find the longest subarray with the sum of elements divisible by k.
9. Implement a function to find the maximum length of a subarray with the sum of elements equal to a given value and at most k distinct elements.
10. Write a function to find the minimum product of a subarray with a given length.
11. Implement a function to find the maximum length of a subarray with the product of elements equal to a given value and at most k negative numbers allowed.
12. Write a function to find the longest subarray with the product of elements divisible by k.
13. Implement a function to find the maximum length of a subarray with the product of elements equal to a given value and at most k distinct elements.
14. Write a function to find the maximum sum of a subarray with at most k changes allowed and all elements are positive.
15. Implement a function to find the minimum length of a subarray with a given sum and all elements are positive.
16. Write a function to find the maximum length of a subarray with the sum of elements divisible by k and all elements are positive.
17. Implement a function to find the maximum sum of a subarray with at most k changes allowed and all elements are non-negative.
18. Write a function to find the minimum length of a subarray with a given sum and all elements are non-negative.
19. Implement a function to find the maximum length of a subarray with the sum of elements divisible by k and all elements are non-negative.
20. Write a function to find the maximum sum of a subarray with at most k changes allowed and all elements are negative.
21. Implement a function to find the minimum length of a subarray with a given sum and all elements are negative.
22. Write a function to find the maximum length of a subarray with the sum of elements divisible by k and all elements are negative.
23. Implement a function to find the maximum product of a subarray with at most k changes allowed and all elements are positive.
24. Write a function to find the minimum length of a subarray with a given product.
25. Implement a function to find the maximum length of a subarray with the product of elements equal to a given value and at most k changes allowed.
26. Write a function to find the maximum sum of a subarray with at most k changes allowed and all elements are distinct.
27. Implement a function to find the minimum length of a subarray with a given sum and all elements are distinct.
28. Write a function to find the maximum length of a subarray with the sum of elements divisible by k and all elements are distinct.
29. Implement a function to find the maximum product of a subarray with at most k changes allowed and all elements are distinct.
30. Write a function to find the minimum length of a subarray with a given product and all elements are distinct.

Beginner Level: View

Advanced Level: View