Google L5 Interview Experience
Summary
I had an interview for an L5 Role at Google and was presented with a problem focused on efficiently handling range update queries on an array.
Full Experience
Helping the community -
I gave an interview for an L5 Role.
Interview Questions (1)
Range Update Query on Array
I was given:
- An array arr of size n
- q queries
- Each query consists of (l, r, k)
For each query, I needed to update all elements from index l to r to value k.
Constraints:
- n up to 10^5
- q queries up to 10^5
Two variations were discussed:
1) If k remains the same for all updates within a range.
2) If k is different for different updates within a range.