You are not logged in. Please login at to post your questions!


Why segment tree failed for "Counting In Byteland"?


This is the problem Counting In Byteland

Segment Tree Solution

BIT Solution

I did this question using segment tree during the contest, got TLE.

I got this idea from here.

I guess my solution have following time and Space complexity:

     update : (logN)^3
     query :  (logN)^3
     space : 8*(8^log8(N))-1


According to the solution, the author gave 3-D BIT solution.

What is complexity of segment tree of update and query?

This question is marked "community wiki".

asked 06 Oct '16, 16:59

rcsldav2017's gravatar image

accept rate: 6%

toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported
  • mathemetical formulas in Latex between $ symbol

Question tags:


question asked: 06 Oct '16, 16:59

question was seen: 463 times

last updated: 06 Oct '16, 16:59