Misc.Dec 23, 2018
Pandoraavailaball

Binary index tree

I am having Facebook interview after New Year. I have done around 300 problems on leetcode (past 6 months Facebook tag) I know the idea and implementation of BIT but I don't quite able to utilize it. I can only solve simple BIT question like Range Sum Query 2D - Mutable. As to more advanced questions like Count of Range Sum, Reverse Pairs, Count Of Smaller Numbers After Self and etc, I am still having troubles to understand the solution in discussion, (either BIT, merge sort or BST) Do I need to spend more time on this category or I should practice other medium level questions? Thanks

Poll
108 Participants
Select only one answer
Add a comment
Microsoft BadNews Dec 23, 2018

Come on, you’re so close! You can do it.

Pandora availaball OP Dec 23, 2018

thanks

Amazon smsn sns Dec 23, 2018

Dont overprepair. have real interviewing practice.

Facebook newsfeed Dec 23, 2018

Don't worry about BIT.

Microsoft cvwe46 Dec 23, 2018

Do easy and medium problems in leetcode. Facebook interviewers count only how many problems you can solve in 45 mins hence. Go fast don't try to add too many test cases or verify if your code works well.

Facebook >> Dec 23, 2018

Don’t worry about Binary Indexed Trees, but make sure you know Fenwick Trees.

Cisco bitset Dec 24, 2018

Both are same. One thing is important, why use this complex logic when prefix sum achieved results in O(1). Sum is o(1) in prefix sum but update is o(n). In large scale system, sum >> update

Facebook >> Dec 24, 2018

“Both are same.” ...that’s the joke...