arujbansal's blog

By arujbansal, 3 weeks ago, In English

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

 
 
 
 
  • Vote: I like it
  • +64
  • Vote: I do not like it

»
3 weeks ago, # |
  Vote: I like it +17 Vote: I do not like it

link of video tutorial?

»
3 weeks ago, # |
  Vote: I like it +3 Vote: I do not like it

Nice video!