Available question text
Given an array and many queries [l, r, threshold], return for each query the element in nums[l..r] that appears at least threshold times (choosing the highest-frequency element, and the smallest value on ties), or -1 if none exists. The core challenge is answering many range-frequency/majority queries efficiently, requiring preprocessing to support fast frequency checks within subarrays.
Related questions
Continue with questions that share topics or the same question type.
- Block Placement Queries
Coding · Array · Binary Indexed Tree · Binary Search
- Check If a Number Is Majority Element in a Sorted Array
Coding
- Closest Equal Element Queries
Coding
- Closest Nodes Queries in a Binary Search Tree
Coding
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 3636. Threshold Majority Queries
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source