leetle

Daily challenge for 2026-11-11

680. Longest Limited FizzBuzz Subarray

Given an array of integers nums and an integer k, return the maximum length of a contiguous subarray that contains at most k "FizzBuzz" numbers. A "FizzBuzz" number is defined as any integer that is divisible by 3 or 5.

Example:
Input: nums = [1, 2, 3, 4, 5, 6], k = 1
Output: 4

Assumptions:
- nums will contain positive integers.
- k is a non-negative integer.
- If no valid subarray exists, return 0.

Constraints: 0 <= len(nums) <= 100000, 1 <= nums[i] <= 1000000000, and 0 <= k <= 100000. An empty list returns 0.

Run this challenge interactively in Python or JavaScript when the app loads.