How to find Nth term of any linear recurrence relation in O( logN ) 4/30/2020 11:48:00 AM 5 min read Motivation: Given a sequence with a recurrence relation. Find is the Nth term of the sequence. Example: Fibonacci sequen...
Burst Balloons ( google interview question ) 7/21/2019 02:36:00 PM Read the question from here: Burst Balloons Let's solve this: Suppose initially we have these 5 balloons. Which balloons we c...
How To Approach The Binary Search Problems 10/18/2018 09:08:00 PM How can we know, that a problem can be solve using Binary Search? ☹️ If a problem satisfies points which are mentioned below, then a p...
Fast Exponentiation 9/30/2018 03:41:00 AM In many Competitive programming problems, you are asked to find ( a^n ) % mod, where n is in between 0 to 10^12. This video will show you ...
Calculate nCr % m in O(n) 9/30/2018 03:36:00 AM Many problems in competitive programming require to calculate nCr % m. And this video will s...
Distributing Balls into Boxes 9/30/2018 03:27:00 AM Here, we are counting the number of ways in which k balls can be distributed into n boxes under various conditions. The conditions ...