Тёмный
No video :(

Coding Interview Question : Factorial Of A Large Number 

Binary Beast
Подписаться 1,6 тыс.
Просмотров 35 тыс.
50% 1

Hackerrank Problem :
www.hackerrank...
Solution :
pastebin.com/r...
If you learned anything from the video give it a thumbs up and do subscribe!

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

 

22 авг 2024

Поделиться:

Ссылка:

Скачать:

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

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 124   
@Rafi-nc3nw
@Rafi-nc3nw 4 года назад
Sir, I am from Bangladesh. I have been getting stuck in finding factorial of large number since long time . Thank you very much for this tutorial !
@binarybeast2685
@binarybeast2685 4 года назад
Glad to help you!
@alllove7084
@alllove7084 2 года назад
This explanation gave me motivation to quit Coding. I am done printf("Bye World");
@varunmahanot5766
@varunmahanot5766 3 года назад
My GATE instructor told he used linked list to solve this but didnt have time to cover the code. Thanks for the wonderful explanation.
@devangagarwal4285
@devangagarwal4285 4 года назад
nice explanation suggestion : [len--] wasnt needed and it would be just while(len--) { cout
@nabilaayman8381
@nabilaayman8381 4 года назад
20 72 😂 It was funny 😂
@swaralikakade2810
@swaralikakade2810 3 года назад
My brain be like ...lets use python.
@vishwassingh9861
@vishwassingh9861 4 года назад
Wow..... It is most neat solution I've seen so far. You are great at teaching.... Totally nailed it
@nishantkaushik7161
@nishantkaushik7161 4 года назад
This a was a nice solution bro .. thank you for this .. keep them coming :)
@sagarpandey243
@sagarpandey243 3 года назад
In while(num!=0) loop, Why are we doing num = num/10; Can we simply make it num=0; Because num is never going to be greater than 10 Please explain?
@abhinashbihari2881
@abhinashbihari2881 4 года назад
Nice Explanation bro All youtuber who are doing this video are only writing the code not explaining anything.Thanks for that
@piyushpathak1186
@piyushpathak1186 3 года назад
YOU are great man. understood in one go Excellent, Outstanding love you
@akshayshinde2403
@akshayshinde2403 3 года назад
Finally I got solution for it. Thank You.
@AlokSingh-jw8fr
@AlokSingh-jw8fr 3 года назад
Bhaiya, your explanation is really awesome. The icing on the cake is your English you were too good. just tell me, if I work hard will I be able to speak English like you confidently
@astitva5002
@astitva5002 2 года назад
brilliant... enjoyed seeing you troubleshoot at the end.
@sachinsharma905
@sachinsharma905 3 года назад
Your explanation was vague at its best. You confused me more.
@ishmam8643
@ishmam8643 4 года назад
Thanks bro U helped me clear my doubts. Your explaining skills are really nice , even though I can only code in C language I totally understood you.
@onkarkandekar3084
@onkarkandekar3084 3 года назад
Thank you, very well explained solution.
@abhinavshukla6418
@abhinavshukla6418 3 года назад
you explained it well but the approach was unthinkable,how can smbdy thin this,probably would have 2 cramb this
@yogeshjangid7334
@yogeshjangid7334 4 года назад
lagta h 5 baar aur dekhna padega
@rajeshadam1093
@rajeshadam1093 3 года назад
best explanation for this question, thanks !
@gokulnaathb2627
@gokulnaathb2627 3 года назад
Very sweet
@jasonwd497
@jasonwd497 3 года назад
You are really good at explaining! thanks a lot
@lets_do_it1154
@lets_do_it1154 4 года назад
Well if we use python we can do it with same old recursion technique also.
@binarybeast2685
@binarybeast2685 4 года назад
Well, give it a shot and try to submit it! All the best! The main motive of using this method is because of the space complexity.
@aakashtripathi8414
@aakashtripathi8414 3 года назад
Bahut mast kaam karta hai tum Bhai 😄😄
@binarybeast2685
@binarybeast2685 3 года назад
Thanks bro!
@bobbykuhikar5527
@bobbykuhikar5527 3 года назад
Pro explanation bro🔥🔥🔥
@binarybeast2685
@binarybeast2685 3 года назад
Glad you liked it
@prabhatgaurav5740
@prabhatgaurav5740 2 года назад
I got this question in my interview and first I stuck but taking some time and hint I am able to crack it.
@aayush5474
@aayush5474 4 года назад
but why are we storing the answer in reverse manner?
@sdexstarlord
@sdexstarlord 3 года назад
Bhai tu bhagwaan h 😭😭😭 Mene 2 hrs waste kr die the iss uestion pe
@techmoon_
@techmoon_ 3 года назад
Thanks man.Perfectlyu understood...
@jhanvimimani8480
@jhanvimimani8480 2 года назад
Amazing explanation!!!!
@amitraman8170
@amitraman8170 4 года назад
wow bro u have showed me a way to think a problem thanks bro...
@rajusingha5616
@rajusingha5616 4 года назад
Loved Your Explanation....Thanks!!!
@binarybeast2685
@binarybeast2685 4 года назад
Glad to help you!
@sulaimant5690
@sulaimant5690 3 года назад
Thanks Manh
@gauravanand_11
@gauravanand_11 3 года назад
You explained so well buddy ! Thankyou :)
@ayushmahajan9010
@ayushmahajan9010 3 года назад
If u explain the login by dry run it with pen and paper then it would be better for most of the learners rather than just telling the code ...Thankyou
@sanketrajgiri1473
@sanketrajgiri1473 3 года назад
👌👌👌
@sabahatnaaz9063
@sabahatnaaz9063 3 года назад
well explained, all are set in the mind..Thank you
@Ankit-ic2mw
@Ankit-ic2mw 4 года назад
sir please tell us how to find Factorial Of A Large Number using modular arithmetic approach
@shreyaskulkarni9994
@shreyaskulkarni9994 4 года назад
This code works only till n
@likhithagaddi
@likhithagaddi 4 года назад
I have a small doubt When "num" has only one digit after 1st inner while loop why can't we use "if" instead of "while" ? Although I have debugged and saw the difference in the output But not able to figure out why is it while instead of if
@HDbIce-oj3wv
@HDbIce-oj3wv 3 года назад
Why did we store 2 in arr[2]? I didn't get that.
@nelsonarockiarajm6551
@nelsonarockiarajm6551 3 года назад
excellent teaching
@yanshulnarotra4934
@yanshulnarotra4934 4 года назад
bhai baht acha explaination tha ,just keep it up
@binarybeast2685
@binarybeast2685 4 года назад
Thanks bhai, new videos coming soon!
@nishithbaravkar7549
@nishithbaravkar7549 3 года назад
thanks a lot brij ... you hero ...godamn saviour
@justindrake8021
@justindrake8021 4 года назад
At least I got the algorithm here. Love from IIT Kharagpur
@nishchayatejasri6322
@nishchayatejasri6322 4 года назад
Very well explained ...Thanks!!!
@himanshugupta7647
@himanshugupta7647 4 года назад
if we also want to find the modulus os the factorial
@manishkumarsingh47
@manishkumarsingh47 3 года назад
Nice Explanation,i love it
@parthpatel1624
@parthpatel1624 5 лет назад
def fact(n); f=1 If n==0; return 1 for i in range(1,n+1); f=f*I return f n=int(input("enter no:"); factorial=fact(n) print(factorial) It's right or not ? Python program check it
@brijpatel237
@brijpatel237 5 лет назад
Input:100 and let me know
@parthpatel1624
@parthpatel1624 5 лет назад
@@brijpatel237 it's work
@brijpatel237
@brijpatel237 5 лет назад
Well,I have given you link just try submitting it on hackerrank
@binarybeast2685
@binarybeast2685 4 года назад
Hi Parth, your approach is not wrong, it's just that this method will not work in case of larger number as it stores the answer in one variable which can create trouble.Just try to understand this method,I bet you will never use that one!
@divyakeshari2299
@divyakeshari2299 4 года назад
@@brijpatel237 My programme can calculate even 3000 factorial.I am serious.
@pranjalagarwal42
@pranjalagarwal42 4 года назад
I want to ask in your loop while num!=0 what is the problem in having arr[x]=num%10
@atyachari1760
@atyachari1760 4 года назад
bhai thoda shi se smja na
@pavandurgakumargunti_1194
@pavandurgakumargunti_1194 3 года назад
bro how to update includepath in vs code when working with boost library or headerfile
@sahirsdesktop4354
@sahirsdesktop4354 3 года назад
Love from Bangladesh bro... god bless ... ❤
@siddharthabajpai4182
@siddharthabajpai4182 3 года назад
You rock!.....cool approach
@detrojapradeepkumar6848
@detrojapradeepkumar6848 4 года назад
Really amazing explanation man, highly appreciated!
@amarchand1336
@amarchand1336 2 года назад
C++ library
@sdani9160
@sdani9160 4 года назад
The 0th index gives a lot of trouble😂
@vigneshraja33
@vigneshraja33 4 года назад
That was neat!
@shivanshusaxena9242
@shivanshusaxena9242 3 года назад
brother i implemented your array approach but it is showing runtime error obviously its in n2+n2.any efficient approach ?
@andiamakaza24
@andiamakaza24 4 года назад
Nice bro
@nishithbaravkar7549
@nishithbaravkar7549 3 года назад
thanks for this wonderful video
@ragghawan
@ragghawan 3 года назад
Could explain a bit more elaborately and slowly..it is kinda rushed
@Vishal-yp3ol
@Vishal-yp3ol 2 года назад
quite complecation too much varaible please optimize it
@shashwatsingh253
@shashwatsingh253 3 года назад
Thank You Bhaiya !!
@jagmeetsingh2000
@jagmeetsingh2000 4 года назад
Please help with the chief hopper problem (greedy algorithm)
@avinashbiradar9953
@avinashbiradar9953 4 года назад
Nice explaination sirji....
@code4u494
@code4u494 3 года назад
while(len>=0)
@chexblu
@chexblu 3 года назад
How would you do it, if you could only store numbers from 0 to 9 on each []. Because I honestly don't know how to put them together to make the limits of the loops.
@chexblu
@chexblu 3 года назад
I mean, to insert 10, you'd need [1][0] not only one with [10]
@Skkskk702
@Skkskk702 4 года назад
well explained,thanks :)
@rahulsrivastav9259
@rahulsrivastav9259 4 года назад
can you explain its time complexity?
@balakurna8336
@balakurna8336 4 года назад
I need a flowchart and description of this factorial of large numbers program...
@binarybeast2685
@binarybeast2685 4 года назад
there's a way to ask buddy, create on your own!
@prajwalchoudhary4824
@prajwalchoudhary4824 4 года назад
brother can u please explain how to create all magic squares of a 3X3 matrix this question is from hackerrank name magic square
@abhinashbihari2881
@abhinashbihari2881 4 года назад
In that case u better take all the possibilities of magic matrix.There should be of 8 Types and after that u can solve it easily by using abs function and finding the min
@anshshah4927
@anshshah4927 4 года назад
Best explanation bro how can I think this way?
@ritikapanjwani9223
@ritikapanjwani9223 3 года назад
your okaay.....that tone is damn amazing haha
@binarybeast2685
@binarybeast2685 3 года назад
haha, glad this video was helpful
@user-qs6lp5dm8m
@user-qs6lp5dm8m 3 года назад
@@binarybeast2685 tharak hai tujmey bhai
@MaxTechKnowledge
@MaxTechKnowledge 4 года назад
put x++ in while(n!=0) loop
@mohammedsadiq1567
@mohammedsadiq1567 4 года назад
Dude in the final while loop where we are taking care of the carry i.e *while(num != 0)* , why are we using modulo 10 on the *num* ?
@advayaggarwal9268
@advayaggarwal9268 3 года назад
Because we want to store only one digit in an array index
@tanmoysarker6459
@tanmoysarker6459 3 года назад
great job
@swrserwerwr9137
@swrserwerwr9137 3 года назад
Can you explain in hindi ?
@himanshugupta7647
@himanshugupta7647 4 года назад
bhai agar factorial ka modulus bhi nikalana hoto
@richakochar4158
@richakochar4158 4 года назад
Thanks
@sarthakthakkar1842
@sarthakthakkar1842 4 года назад
Osum man!!
@tanmaytyagi7031
@tanmaytyagi7031 3 года назад
Can you Share your IMP notes files with me?
@divyakeshari2299
@divyakeshari2299 4 года назад
Can we calculate 1438 factorial using this process
@cheppanubrother801
@cheppanubrother801 4 года назад
Yes, you can
@tanmoysarker6459
@tanmoysarker6459 4 года назад
great
@bilbo_baggins_
@bilbo_baggins_ 4 года назад
nicely explanntion
@binarybeast2685
@binarybeast2685 4 года назад
Thank you so much buddy!
@taaniyasaini6619
@taaniyasaini6619 3 года назад
bhai khudko padara hai ki sbko itti tex tex bole jara
@PaAGadirajuSanjayVarma
@PaAGadirajuSanjayVarma 4 года назад
That tension face for increasing size of video file :)
@nirnayjain7097
@nirnayjain7097 4 года назад
Use phython and live cool😎😎
@palsanjay1922
@palsanjay1922 5 лет назад
super !!!!!!!!!!!!!!
@binarybeast2685
@binarybeast2685 4 года назад
Thank you so much!
@himanshunegi5228
@himanshunegi5228 4 года назад
bro please upload some videos and trick ....
@binarybeast2685
@binarybeast2685 4 года назад
Sure buddy, I am slightly busy in the internship work.
@Abhay.Bhandari
@Abhay.Bhandari 3 года назад
Bro video is quite confusing. Its better if you first explain algorithm and then your code.
@binarybeast2685
@binarybeast2685 3 года назад
Sorry for that
@prashantkumar-og5ob
@prashantkumar-og5ob 4 года назад
by this way we will get the tome complexity as O(n^2). plese optimize the code or else gavi us any new idea
@morisworm6648
@morisworm6648 4 года назад
num/10=0 how?
@binarybeast2685
@binarybeast2685 4 года назад
Hi devil, if the number is less than 10, it will give value as 0.___ so by default C++ considers it's floor value which is 0.Hope it solves your doubt.
@sarthakgarg5842
@sarthakgarg5842 4 года назад
Make videos in hindi
@anjalisingh-sx5ct
@anjalisingh-sx5ct 4 года назад
Oookk😂
@vijaynarnaware9782
@vijaynarnaware9782 4 года назад
You literally fail to explain bro
@binarybeast2685
@binarybeast2685 4 года назад
Can you please elaborate, at which point who lost the track, I am glad to help you!
@harshchoudhary4490
@harshchoudhary4490 4 года назад
@@binarybeast2685 bhai aise kon samjhata hai sara variable ek saath inisialize kr na itna confusing bana diya pura code 3 baar dekhe phir samajh me aaya
@rajusingha5616
@rajusingha5616 4 года назад
Loved Your Explanation....Thanks!!!
Далее
Google Coding Interview With A High School Student
57:24
PEDRO PEDRO INSIDEOUT
00:10
Просмотров 2,7 млн
Big Factorials - Numberphile
12:27
Просмотров 385 тыс.
Factorial Of Big Numbers
14:03
Просмотров 4,7 тыс.
Fast Inverse Square Root - A Quake III Algorithm
20:08
How This New Battery is Changing the Game
12:07
Просмотров 201 тыс.
Programming Loops vs Recursion - Computerphile
12:32
Просмотров 1,5 млн
why are switch statements so HECKIN fast?
11:03
Просмотров 404 тыс.
I Made My Own Programming Language
10:20
Просмотров 88 тыс.
What is a Monad? - Computerphile
21:50
Просмотров 600 тыс.