Available question text
Given an array and a list of queries, each represented as a tuple (L, R, K), return the final state of the array after applying all queries in order, where each query replaces all values at indices L through R (inclusive) with the value K. The problem has two subparts: (1) K is the same constant for all queries, and (2) K differs per query. Example: Array [1,2,3,4,5] with queries [(1,3,9),(2,4,7)] yields [1,9,7,7,7].
Related questions
Continue with questions that share topics or the same question type.
- Given an array nums and a sliding window of size k moving from the very left to the very right, return the maximum value in the window for each position. Solve in O(n) time using a deque.
Coding
- Given an array of integers and a target value, return the indices of two numbers that add up to the target
Coding
- Maximum Value at a Given Index in a Bounded Array
Coding
- Count Paths With the Given XOR Value
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
Google
Range Assignment Queries: Replace Array Subranges with a Given Value
Reported Jul 17, 2026 · 1 source report
MID_LEVEL
Source snapshot: Nov 12, 2026
View source