Hey guys, I made a short tutorial on finding the majority element in a range using a segment tree.
Video: Majority Element Range Queries
This can be used to solve the recent problem 1514D - Cut and Stick in $$$O((N + Q).log(N))$$$ (the bonus complexity mentioned in the editorial).
See my code: 113593731
link of video tutorial?
Oops, fixed.
Nice video!
Thanks!
Nice video