2

This question sounds very vague and needs some explanation:

I learned about Binary Indexed Tree a few weeks ago. This data structure is a brilliant design. It actually took me very long to figure out how it's built thanks to this video (I mean... this is the first time I couldn't understand a written documentation and have to watch someone drawing a BIT step by step..)

Anyway, so (I think) I know how to build a BIT and the basic idea behind the structure design.. And now, I'm excited to practise some problems that can be easily solved with BIT.. In fact, someone has gathered a list of nice problems in this Quora post. I also tried some on HackerRank.

I spent long time trying and only managed to solve two (one by myself, the other taken from other's solution).. For instance, this direct connections problem..

I realise that the problem is never about how to build a BIT. The real challenge is to conceptualise the problem and use BIT to solve it... this is really beyond my imagination.. Is there a technique that I can use to tackle such problems?

And the interesting observation is.. for each problem set, the discussion below contains some comments like:

"BIT... :)"

It's like whoever managed to solve the problem always ended up with a proud smiley face without further explanation :(

Also, are there some classical problems that are solved by BIT?

EDIT

For those who voted to close this question: please give a valid reason. I believe this question is worth a discussion here!

Arjun Sunil Kumar
  • 1,781
  • 3
  • 28
  • 46
xialin
  • 7,686
  • 9
  • 35
  • 66
  • But it depends. Can you choose a *particular* problem? – harold May 02 '16 at 13:35
  • @harold how about the direct connections problem I linked in the post... what does it depend on? – xialin May 02 '16 at 13:39
  • Those who have voted to close this question *have* given a valid reason: "There are either too many possible answers, or good answers would be too long for this format." You're forgetting that Stack Overflow is not a discussion forum. If you feel that you need discussion on this topic, I suggest you find a place where such discussion is welcomed. (And no, I have no suggestions as to where that might be.) – beaker May 03 '16 at 14:34
  • @beaker thanks for the reply. appreciated! I'm afraid that doesn't sound a good reason. I'm not expecting ALL possible answers or the perfect answer (which could be "too long for this format"). I've seen many technical discussions on Stack Overflow. I agree that this question is broad, but "too many" or "too long" answers are definitely not the reason to block a question. – xialin May 05 '16 at 03:48

0 Answers0