Practice Problems
Problem |
Difficulty |
---|---|
Easy |
|
Easy |
|
Easy |
|
Easy |
|
Check in binary array the number represented by a subarray is odd or even |
Easy |
Easy |
|
Medium |
|
Medium |
|
Medium |
|
Medium |
|
Medium |
|
Medium |
|
Print modified array after multiple array range increment operations |
Medium |
Hard |
|
Range Minimum Query (Square Root Decomposition and Sparse Table) |
Hard |
Range Query on array whose each element is XOR of index value and previous element |
Hard |
Queries for GCD of all numbers of an array except elements in a given range |
Hard |
Hard |
PreComputation Technique on Arrays
Precomputation refers to the process of pre-calculating and storing the results of certain computations or data structures(array in this case) in advance, in order to speed up the execution time of a program. This can be useful in situations where the same calculations are needed multiple times, as it avoids the need to recalculate them every time.
This technique relies on fast retreival of already stored data rather than recalculation.