Тёмный
No video :(

Fibonnaci O(LOGN)  

Code with Alisha
Подписаться 28 тыс.
Просмотров 9 тыс.
50% 1

Опубликовано:

 

24 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@sampathrakesh425
@sampathrakesh425 2 года назад
I don't know why I haven't discovered this channel yet... You're a gem.
@pragneshamadavadi2267
@pragneshamadavadi2267 Месяц назад
thanks for making matrix exponentiation very easy 🔥🔥
@cypher7536
@cypher7536 2 года назад
Saw many videos on matrix exponentiation but this was the best... 🔥🔥
@armaan8969
@armaan8969 Год назад
Thanks di ,I was struggling here from a long time..Ur explaination was legit..Cleared the concept 🤩🤩
@AmanSharma-vb5jl
@AmanSharma-vb5jl 2 года назад
you are a magician
@arsenruslanovich6642
@arsenruslanovich6642 2 года назад
Great, thank you FIBONACHI MAMA MIA
@harsh-govind
@harsh-govind 11 месяцев назад
Best Time Complexity | Iterative | log(n) #define m 1000000007 vector matMul(vector &a, vector &b) { vector ans = {{0, 0}, {0, 0}}; for(int i=0; i
@AJ-xc3ks
@AJ-xc3ks 5 месяцев назад
Thanks a log dii❤
@Alonkete
@Alonkete 3 месяца назад
I luv u alisha❤
@joe0212
@joe0212 2 года назад
Great 👍
@meandpenguinvlogs8221
@meandpenguinvlogs8221 2 года назад
Amazing
@HassanFathi2002
@HassanFathi2002 Год назад
great
@k.abhijeet
@k.abhijeet 2 года назад
Great explanation!
@ChandanKumar-xd1tg
@ChandanKumar-xd1tg 2 года назад
Super explain
@omnnnooy3267
@omnnnooy3267 Год назад
thank you so much!
@puliashreeth1169
@puliashreeth1169 2 года назад
good explanation😉
@mohammadyasir6297
@mohammadyasir6297 9 месяцев назад
Can anyone explain this line vectorans(2,vector(2,0));
@shivangyadav5887
@shivangyadav5887 Год назад
Base case n==-1 can be removed i think beco'z base case 0 is written first
@pawfulpurrr
@pawfulpurrr Год назад
Thank u akka
@user-qz3oh7su8f
@user-qz3oh7su8f 10 месяцев назад
@harsh-govind I have written the same solution in java but got the wrong result. For instance, n =4 got result as 9. Please correct the solution. public class SumOfNFibonnaci { public int[][] sum(int[][] mat, int nNumber) { if(nNumber == 1) return mat; int[][] tempM = sum(mat, nNumber/2); if(nNumber%2 == 0) return matMultiply(tempM, tempM); else return matMultiply(tempM, matMultiply(tempM,mat)); } public int[][] matMultiply(int[][] mA, int[][] mB){ int[][] mM = {{1, 1},{1,0}}; for(int i =0; i < 2; i++) { for(int j =0; j < 2; j++) { for(int k =0; k < 2; k++) { mM[i][j] += (mA[i][k]*mB[j][k])%1000000009; } } } return mM; } public static void main(String[] args) { // TODO Auto-generated method stub int n= 4; //1,1,2,3 int[][] mat = {{1, 1},{1,0}}; SumOfNFibonnaci sumOfNFibonnaci = new SumOfNFibonnaci(); int[][] res = sumOfNFibonnaci.sum(mat, n); System.out.println("res: "+ res[0][1]%1000000009); } }
@SinghSurjeet-wq4eg
@SinghSurjeet-wq4eg 2 месяца назад
I don't know why people said its a good explanation but I know this is worst explanation and just wasted my 22 minutes on this I am sorry to say but your speed is 1.5 x
Далее
Binary Exponentiation | Pow(x,n) | Leetcode #50
10:09
“Bernabéu… pressure… 90,000” 🔥🔥🔥
01:02
Х.евая доставка 😂
00:23
Просмотров 703 тыс.
Matrix Exponentiation + Fibonacci in log(N)
31:23
Просмотров 67 тыс.
He Didn’t Know My Mom is a Chess Grandmaster…
5:55
The World's Best Mathematician (*) - Numberphile
10:57