Problem in understanding 2D BIT

Правка en1, от ankit_gupta_, 2018-07-19 11:28:43

Please help me with some doubts, I was reading 2D BIT, gfg implementation https://www.geeksforgeeks.org/two-dimensional-binary-indexed-tree-or-fenwick-tree/

In the updateBit and getSum function inner loop, "y" is not initialized again, can someone explain me how is it working and what is the need of outer loop as the same work can be done with the help of an "if" statement.

Thanks in advance..

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский ankit_gupta_ 2018-07-19 11:28:43 434 Initial revision (published)