Last active
May 13, 2022 04:30
-
-
Save HimanshuMittal01/1d40c5f0df5f6f1f14bfd555371c7578 to your computer and use it in GitHub Desktop.
Original source: https://cp-algorithms.com/data_structures/sparse-table.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int log[MAXN+1]; | |
log[1] = 0; | |
for (int i = 2; i <= MAXN; i++) | |
log[i] = log[i/2] + 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment