Available question text
Count the contiguous subarrays that contain at least two prime numbers and whose maximum prime minus minimum prime is ≤ k; with n up to 5×10^4 this is best solved by efficient prime detection plus a sliding-window/two-pointer scan over prime positions to count valid intervals.
Related questions
Continue with questions that share topics or the same question type.
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3589. Count Prime-Gap Balanced Subarrays
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source