[Video Tutorial] Offline Range Queries with Mo's Algorithm

I made a short tutorial on answering range queries offline with Mo’s algorithm on my YouTube channel here:
Offline Range Queries with Mo’s Algorithm

I explain how to use Mo’s algorithm in general and solve the problem Codeforces - Little Elephant and Array using it in the video.

Alternative sorting order for Mo’s algorithm:
An alternative sorting order for Mo’s algorithm by gepardo

Here are some practice problems (feel free to recommend some in the comments):


Then let’s not have clickbait :slight_smile: Please edit the title to keep it just informative - we’re sure the community appreciates great resources without gimmicks attached.

1 Like