Problem :Link I applied the sparse table algorithm here, but I'm somehow getting a runtime error in one of the test cases. Also, I tried to see where is it going wrong, and in the code, the first "here" is printing, and the second "here" after the declaration of the minimum_query array(mq) is not running(for the test case which is giving runtime error). So I guess that the problem should be somewhere there?
Code
Declare your matrix globally
I did it and now the compiler is stuck and I can't type anything. Is there something wrong with my syntax?
Why are you declaring a sparse table of size N^2 ? This surely gets ML.
Thanks! That was the problem.