Need help in BIT

Can somebody explain “Range Updates And Range Queries in BIT”?
Can’t Understand…Please Help…

BIT is binary indexed tree(fenwick tree) ??

Yeah In Binary Indexed Tree.

Hi @avik26091998,

I recommend you to do it in this sequence:

  1. Understand BIT
  2. Range Query logic
  3. Just code a simple inplementation
  4. Code a slightly complicated one
  5. You cannot become good at it unless you code it multiple times. So it’s okay to study the code from the above sites and write it on paper, if need help then check the code again.
  6. Repeat 3-5 until you are able to code it perfectly without referring the reference material.
  7. Solve these to improve your concepts
  8. Upvote this post if you liked it :slight_smile:
1 Like

@obi1 great post.
Can you suggest such a post for segment tree. I know basic of segment trees like rmq, point update.

Hi @pavitra_ag,
I personally am not very good with segment trees but I can suggest you the approach I took to get started.

  1. Tushar Roy’s basics
  2. Lazy propogation
  3. Fast Iterative implementation of segment tree
  4. Recursive segment tree
  5. What I personally refer to
  6. There’s simply no substitute to just solving it again and again using pen and paper(kinda fun doing in class when the lecture going on is pretty boring)
  7. I am currently solving these to get the hang of it
1 Like