Program To Print All The Divisors Of A Given Number | FREE DSA Course in JAVA | Lecture 12

  Рет қаралды 8,753

TAP ACADEMY

TAP ACADEMY

Жыл бұрын

Data Structures and Algorithms Free Course (Learn DSA Without Paise) Playlist - • Data Structures And Al...
We are up with the lecture 12 of our much awaited dsa course in java.
In this lecture we will understand the logic behind printing all the divisors of a given number.
Check out the complete video to learn the logic and program for finding the divisors of a given number.
Subscribe to our channel for regular updates on the dsa course and click on the bell icon to never miss an update from our dsa course.
For more information, fill this form: forms.gle/8eiUmM92Fx563Aen9
or call us at 8884881203
Facebook: / thetapacademy
Instagram: / tapacademy_online
Linkedin: / 73820805
Website: www.thetapacademy.com​
#dsa #dsacourse #java #dsainjava #javaprogramming #coding #coder

Пікірлер: 27
@arushitandon4766
@arushitandon4766 4 ай бұрын
with all due respect , sir, your voice is like music to my ears.
@yoigee
@yoigee 20 күн бұрын
for input 6 it is printing 1,2,2,3,6
@mohithnr1253
@mohithnr1253 4 ай бұрын
next level teaching..........tq so much sir
@shameershamee0
@shameershamee0 7 ай бұрын
Great!
@abdusselamspahiu2151
@abdusselamspahiu2151 Жыл бұрын
this video was so scientific and inclusive, liked it very much
@_sarthakmisal
@_sarthakmisal 7 ай бұрын
Code has correction check for 20 4 repeats 2 times
@rajatmoraniya6368
@rajatmoraniya6368 6 ай бұрын
if(n%i == 0 && n/i != i && i
@Cricket_facts1845
@Cricket_facts1845 4 ай бұрын
Why it is happening?
@modhugumudiushasri2330
@modhugumudiushasri2330 Жыл бұрын
thanks for the great content sir. and your teaching skills are amazing..
@parthbadkul3524
@parthbadkul3524 12 күн бұрын
but your code has a flaw for values like 6 which has ODD divisors it will duplicate the divisors
@arbazahmadkhan9128
@arbazahmadkhan9128 Жыл бұрын
Love to watch your video
@TAPACADEMY
@TAPACADEMY Жыл бұрын
Thanks for the constant support to our videos. Keep watching.
@hrithikrudra4292
@hrithikrudra4292 Жыл бұрын
Awesome
@TAPACADEMY
@TAPACADEMY Жыл бұрын
Thanks Hrithik. Do subscribe to our channel for regular updates.
@abhishek_______.
@abhishek_______. 2 ай бұрын
sir, there's a problem in that 2nd loop statement where the numbers are iterating in reverse order, let's suppose if there is a number 90 whose factors are to be printed then in the 1st loop i will go from 1 to 9, then after coming from the 1st loop i value will become 10, now in the 2nd loop i will start from 10 and go still 1, if you divide 90/10 again 9 will get printed so basically the output is going to be like this : 1 2 4 5 6 9 9 10 15 18 30 45 90 so to avoid this problem in the 2nd loop you must add one extra condition that is " i ! = (n/i +1) " then this repeatation problem will not occur. I hope you look into this problem and find it useful. Thank you sir for providing such a wonderful course for free.
@shhivanshh
@shhivanshh 2 ай бұрын
Good observation, thanks
@parthbadkul3524
@parthbadkul3524 12 күн бұрын
thank you
@yesican_iwill5090
@yesican_iwill5090 11 күн бұрын
this code will not work for n=20
@sreenijanarayana8468
@sreenijanarayana8468 Жыл бұрын
very good explanation sir.....but, for input:40....this logic prints 4 two times...as i in the first loop exceeds 4 and becomes 5....so initialization in the 2nd loop has to be i=i-1.
@abdusselamspahiu2151
@abdusselamspahiu2151 Жыл бұрын
but you have to do some homework yourself, that u just did.
@abdusselamspahiu2151
@abdusselamspahiu2151 Жыл бұрын
i fixed it by replacing '!=' '
@ShivKumar-py4oe
@ShivKumar-py4oe Жыл бұрын
when will be the course complete
@TAPACADEMY
@TAPACADEMY Жыл бұрын
We are uploading one to two lectures on a daily basis. The course to be complete within 1.5-2 months
@rajatmoraniya6368
@rajatmoraniya6368 6 ай бұрын
for 20 it is 4*5 and 5*4 put this condition in second loop if(n%i == 0 && n/i != i && i
@rahulgaikwad593
@rahulgaikwad593 6 ай бұрын
for 90: 9 is printing 2 times so i resolve this by adding one more condition in second for loop: if( n%i == 0 && i != n/i && i*i
@munibakhan-du2bj
@munibakhan-du2bj 6 ай бұрын
can you plz explain
@anukaran1307
@anukaran1307 4 ай бұрын
if (n % i == 0 && n / i > i) put this condition instead, this denotes all previous values of i should not be printed in the second loop
6 Verbal Tricks To Make An Aggressive Person Feel Instant Regret
11:45
Charisma on Command
Рет қаралды 23 МЛН
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 43 МЛН
小宇宙竟然尿裤子!#小丑#家庭#搞笑
00:26
家庭搞笑日记
Рет қаралды 16 МЛН
НЫСАНА КОНЦЕРТ 2024
2:26:34
Нысана театры
Рет қаралды 1,5 МЛН
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 15 МЛН
Syed Muzammil Shah on Political Science, Journalism and Philosophy.
1:37:14
KP Reddy | Shadow Ventures | MultifamilyCollective
57:37
Multifamily Media Network
Рет қаралды 1,2 М.
News Breakdown Excerpt | Bangladesh scores a win for Western hegemony
16:43
كيف تنجح العلاقات مع ياسر الحزيمي | بودكاست فنجان
3:03:09
CHUNKZ vs FILLY ft Speed, Beta Squad and AboFlah | Match 4 Hope
3:14:06
GFG POTD: 21/10/2023 | Sum of All Divisors from 1 to n | Problem of the Day
10:17
Java Tutorial for Beginners (Part 1) | TAP Academy
2:19:33
TAP ACADEMY
Рет қаралды 117 М.
Nastya and SeanDoesMagic
00:16
Nastya
Рет қаралды 43 МЛН