JOIN
Get Time
forums   
Search | Watch Thread  |  My Post History  |  My Watches  |  User Settings
View: Flat (newest first)  | Threaded  | Tree
Previous Thread  |  Next Thread
Sparse Table equation for RMQ error | Reply
The equation says M[i][j] = min(M[i][j-1] , M[i+2^(j-1)-1][j-1]
Second part should be M[i+2^(j-1)][j-1]

The code is correct though. Please fix it for others, I spent more than 15 min. breaking my head over this :)
RSS