arujbansal's blog

By arujbansal, 4 years 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

»
4 years ago, # |
  Vote: I like it +17 Vote: I do not like it

link of video tutorial?

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

Nice video!

»
3 years ago, # |
  Vote: I like it -8 Vote: I do not like it

Nice video