Fenwick Tree range queries

  Рет қаралды 37,245

WilliamFiset

WilliamFiset

Күн бұрын

Пікірлер: 43
@boxxanon
@boxxanon 6 жыл бұрын
Best Fenwick Tree explanation currently on the internet... perhaps even the entire world. Congrats!
@chiranjeevthomas4796
@chiranjeevthomas4796 6 жыл бұрын
Being a visual learner , these tutorials helped me to get the intuition behind the algorithm because of the visual aids you used . I revel in problem solving and am on codeforces and topcoder... I was really lacking in algo - ds knowledge and your tutorials are helping me up my game :D , thanks a lot bud . P.S - Please make a video on RANGE UPDATES too , that would really help !!
@ThePabs213
@ThePabs213 4 жыл бұрын
Awesome explanation, I would really appreciate a Segment Tree or Interval Tree explanation like this
@TheWildStatistician
@TheWildStatistician 5 ай бұрын
Wow, just wow! On a side note, I think it's better to consider the position of the LSB in the 0-indexed way, since in that case an index is directly responsible for 2^(0-indexed position of LSB) element below it, inclusive of itself. Then cascading to the appropriate next element is intuitive, just remove the LSB. Essentially going down 2^(0-indexed position of LSB) :D. Anyways, fantastic job!
@harishvemula6709
@harishvemula6709 5 жыл бұрын
MASTER PIECE !! The best ever Fenwick tree tutorial on the universe .
@ДимитрийЮн-ц7д
@ДимитрийЮн-ц7д 4 жыл бұрын
I like your presentation and methodical approach. When material is shown properly It saves a lot of time.
@МихаилХамхоев
@МихаилХамхоев 7 жыл бұрын
I FOUND IT!!! The best one! Thank you! :)
@rishabhmishra9611
@rishabhmishra9611 4 жыл бұрын
Really nice explanation everyone is just teaching how to code but is telling the fundamentals of this datastructures🔥
@cristian-adrianfrasineanu9855
@cristian-adrianfrasineanu9855 2 жыл бұрын
i - LSB(i) is equivalent to i & (i - 1) to get the next greatest power of 2 that is smaller than i. This will save time with avoiding to write another function for parsing the bit representation of i.
@catte_6376
@catte_6376 Жыл бұрын
it's actually `i & (-i)` !
@ubabnameh
@ubabnameh 2 ай бұрын
​@@catte_6376 no its not. it is i - (i&-i), which, if you analyze is equivalent to OP's expression i & (i-1)
@minghanxu7199
@minghanxu7199 5 жыл бұрын
I have to say this video is awesome and really clear! thanks!
@mathuratudu7271
@mathuratudu7271 7 жыл бұрын
The best video I ever watched on Fenwick Tree
@just_patricia280
@just_patricia280 3 жыл бұрын
Thank you for the help! You rock!
@abhinavsingh4221
@abhinavsingh4221 4 жыл бұрын
This channel is awesome! Thank you buddy for your awesome videos :)
@wanga6745
@wanga6745 4 жыл бұрын
You are my hero, great explanation!
@vipulgupta3827
@vipulgupta3827 4 жыл бұрын
@WilliamFiset can you please add some videos for Segment tree. Your explanations are brilliant
@eugnsp
@eugnsp 6 жыл бұрын
Bit manipulations are much easier and clearer if zero-based indexing is used rather than one-bases indexing. Then there is a direct correspondence between ranges of responsibilities and bit value in the n-th position.
@vipulgupta3827
@vipulgupta3827 4 жыл бұрын
can you put more details related to 0 based indexing for this. i am not sure if 0 based indexing will work
@geogreenmanu
@geogreenmanu 4 жыл бұрын
12 in binary 1100, then LSB is at third position ? How? The least significant bit is the right-most bit in a string, if the bit are order right to left, as done in this example.
@joseville
@joseville 3 жыл бұрын
Yeah, some of the language used is imprecise. Instead of LSB, it should be "Least Significant One". And also in this video, "third position" means the 2^2 = 4's place.
@pavan7959
@pavan7959 7 жыл бұрын
Thankyou so much sir your videos helped me a lot.
@arijit_ad
@arijit_ad 6 жыл бұрын
Every nicely explained. Can you also explain segment tree?
@purushottam2010
@purushottam2010 4 жыл бұрын
Please make a video on range updates!! I am not able to find a way to grasp it
@incognito8336
@incognito8336 13 күн бұрын
Best explanation out there
@karamkassem9821
@karamkassem9821 2 ай бұрын
Thanks for the explanation ! But I can't see why this algorithm is good. Everyone is taking about how to get the ranges but no one is talking about how to build the tree, it will take O(nlogn) time which is not efficient ! I mean if we used the first method where building the prefix sum array is in O(n) time and access in O(1) time, it is more efficient for range sum problem ! Any thoughts?
@guy_you_can_trust
@guy_you_can_trust 19 күн бұрын
its O(1) for a sum(i, j) but updates are O(n). it's also possible to build the tree with O(n) TC
@al-hassanmohamed2339
@al-hassanmohamed2339 Жыл бұрын
Thanks a lot to you ❤
@erithion
@erithion 5 жыл бұрын
Great explanation. Thanks!
@sgdfdsgs
@sgdfdsgs 3 жыл бұрын
what an amazing channel
@harshitsharma7358
@harshitsharma7358 4 ай бұрын
great explanation
@rasca0027
@rasca0027 6 жыл бұрын
I have a question. at 5:10, isn't LSB the right-most bit, which is 0?
@WilliamFiset-videos
@WilliamFiset-videos 6 жыл бұрын
Yep, you're correct. That's a mistake in the audio recording, the slides are still accurate and highlight the LSB.
@rasca0027
@rasca0027 6 жыл бұрын
Thank you!
@kgzcq
@kgzcq 4 жыл бұрын
@@WilliamFiset-videos Hi, do you mean the "LSB that is 1" ? because by definition, LSB is always the right-most bit, and according to the video/slides, you seem to be referring to the least significant bit that is a 1.
@joseville
@joseville 3 жыл бұрын
@@kgzcq This! Another good term for it could be "Least significant One"
@vetiarvind
@vetiarvind 5 ай бұрын
Dude this rocks..
@nitishshingde9767
@nitishshingde9767 7 жыл бұрын
great tutorial!!!
@JynyChen
@JynyChen Жыл бұрын
2:32 what is PLA?
@hoanganhtu9090
@hoanganhtu9090 3 жыл бұрын
the link is broken
@ZakariaBinAhmed
@ZakariaBinAhmed 2 жыл бұрын
💚
@AtiyaAnjum
@AtiyaAnjum Жыл бұрын
😀
@georgetsiklauri
@georgetsiklauri 4 жыл бұрын
Mate, you've got quite a lot of some very strange cracking noise in your videos.. sort of you're juggling with iron balls during recording this video.. it's very annoying.
Fenwick Tree point updates
4:36
WilliamFiset
Рет қаралды 13 М.
How to Design a University 'We Are Hiring' Ad  Easy Tutorial
28:45
Kumar Tutorial Videos
Рет қаралды 11
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 4,8 МЛН
Random Emoji Beatbox Challenge #beatbox #tiktok
00:47
BeatboxJCOP
Рет қаралды 67 МЛН
Walking on LEGO Be Like... #shorts #mingweirocks
00:41
mingweirocks
Рет қаралды 7 МЛН
Hash table hash function
17:21
WilliamFiset
Рет қаралды 43 М.
Tutorial: Binary Indexed Tree (Fenwick Tree)
17:31
JAlgs
Рет қаралды 63 М.
Fenwick Tree construction
6:29
WilliamFiset
Рет қаралды 15 М.
Segment Trees Tutorial | Range Queries | Interview Questions
1:13:23
Kunal Kushwaha
Рет қаралды 53 М.
SQLModel + FastAPI: Say Goodbye to Repetitive Database Code
19:50
Sparse Table & RMQ (Range Minimum Query)
18:42
Errichto Algorithms
Рет қаралды 78 М.
Fenwick Tree or Binary Indexed Tree
22:43
Tushar Roy - Coding Made Simple
Рет қаралды 239 М.