arujbansal's blog

By arujbansal, 3 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 - Вырежи и склей 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 years ago, # |
  Vote: I like it +17 Vote: I do not like it

link of video tutorial?

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

Nice video!

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

Nice video