Who the heck dislikes this😑. Thanks a lot for the efforts Kunal! Really appreciate it. The series has made me switch from Netflix to studying DSA 😂it's so addictive
@@KunalKushwaha this frequency of posting tutorials every alternate day is much better than posting every day as it gives us time to practice properly instead of rushing to keep up with you
@@davs2002 He already mentioned that he'll upload all videos and it will be self paced. Most of us here are in final year and want to brush up all concepts clear before the placements starts so it'll be better if he uploads 1 video everyday. Also you can watch videos alternate days and practice in between 😀
# GOD Of DSA Hi I am a 11yr exp java guy was searching for some free course on youtube for DSA came accross your course and i just feel love in it...all in one place that too with java...i must say you have done very awsome work...your name will be there on this earth as long as DSA will be asked in interviews...May Supream Lord Vishnu Bless You..✌🙏
Hey Kunal! Don't feel pressurized coz of the comments asking for more videos. The frequency and quality of your video is awesome! Cheers and take ur time! Thanks a lot for this commitment ;))
@@KunalKushwaha are na na i didnt mean like that i just meant such is the quality of the content.. it makes waiting worth it😅.. sorry if i choose the wrong words
Bhai CIVO channel p v deveops ka bootcamp mein padha rhe h aur twitch p v Opensource(MLH) k liye kl podcast kiye the...so if you are interested in these, you may follow these videos.
Many thanks, Kunal! 🤛 This lesson was a good opportunity for me to practice loops and conditions. Something that for many more experienced developers surely is daily business. I try to make it a habit to first write the pseudo code and the flowchart for the assignments and then I go over to code the solution in Java, JavaScript and Go. This takes a ton of time, but this way the stuff sticks in my old brain. I appreciate your contribution to free education. 🤝
All of your videos from basic to advanced are unavoidable due to your super smart style of teaching. It's a gift for many of us beginner or experienced who so ever I believe.
@@KunalKushwaha one biggest plus point in all your teachings , you are successfully able to generate interest on such difficult topics like DSA of folks watching these videos in a true sense
If I could, I would write this in every video: nobody dedicated so much on the internet to teach such complex subjects in a clear, crystal-clear manner, besides the amazing quality. And tks for teaching in English, I am a native Portuguese speaker and I have English as a second language, however, most of the good videos are available in Hindi and have no translation to English. Tk you forever!! (I have you as a reference in terms of learning, better than all my professor in computer science college adding altogether)
kunal bhaiya i know you must be busy but adding a lecture of you doing an open source project using what we have learnt so far in this course will make it absolutely complete because what most of us lack is implementation and it'd mean the world to us if you'd think about it. Thank you for everything
noone could teach as better as kunal sir,mean my words guys this is the most understanding and easy explained coarse just follow the assignments question to build more confidence ,and see the result after a month that the level is increased,i highly appreciate this work done by kunal sir i wish i could meet and thanks for all this.
I am enjoying the series by Kunal, literally binge watching this Kunal playlist. I tried to modify the calculator program here and added just a few logic: import java.util.Scanner; public class Calculator { public static void main(String[] args) { // The calculator program tutorial by Kunal; Scanner input = new Scanner(System.in); // takes in user input // Calculation logic. // should be a loop while (true) { System.out.println("Enter the operator to use "); // takes the operand we'll be using char op = input.next().trim().charAt(0); if (op == '+' || op == '-' || op == '/'|| op == '*' || op == '%'){ System.out.println("Enter the 2 numbers to use "); int res = 0; int num1 = input.nextInt(); int num2 = input.nextInt(); boolean validCalculation = true; if (op == '+') { res = num1 + num2; } else if (op == '-') { res = num1 - num2; } else if (op == '/') { // But we cant divide a number by 0, it will throw an error. if (num2 != 0) { res = num1 / num2; } else { System.out.println("Hey there, this is not valid as it will return infinity"); validCalculation = false; } } else if (op == '*') { res = num1 * num2; } else if (op == '%') { if ( num2 != 0) { res = num1 % num2; } else { System.out.println("Hey there, this is will result to an error, cant have this"); validCalculation = false; } } if (validCalculation){ System.out.println("Your result is " +res); } } else if ( op == 'x' || op == 'X') { break; } else { System.out.println("Invalid Operator"); } } } }
My god I'm amazed by the way u give us the way to build logic for problem-solving, thanks Kunal, never seen such an amazing playlist ever before, thanks, man!
Simple version for Fibonacci numbers : import java.util.Scanner; public class Fibonacci_number { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.print("Enter the no. of terms: "); int n = input.nextInt(); int firstNumber = 0; int secondNumber = 1; System.out.println("Fibonacci number till" + n + "terms"); for (int i = 0; i
@@mayureshpisat2274 for the nth Fibonacci we only need n - 1 and n - 2 element here we take 2 variable firstNumber and secondNumber they are in the real sense last and second last
Bro I was planning to buy course of DSA JAVA from coding ninja and suddenly i searched on RUclips and start playing your videos .Now i am addicted to your channel.Thank you for uploading these quality course,you saved my money.❤❤❤
In those multiple if else statements , if salary >10000 and if salary>20000 are intersecting ones. Eg: Let salary be 11000 , then according to the code it should give 13000 , which it will give . But if you put salary> 20000 , for eg : salary= 22000 , it will not give us 25000 , but we will get the output as 24000. I know its nothing but its bit confusing for me so I thought i should comment so that a newbie wont get confused. Keep on going like this Kunal.
Thank you so much! I was actually looking for this comment. What is the solution to this? Is it putting greater than 10k and less than 20k in the first if statement?
Q1 : using operators //Q:find maximum of three numbers int max = a; if (b> max && b > c){ System.out.println("The maximum number is : " + b); }else { System.out.println("The maximum number is : " + c); } }
public class fibo { public static void main(String[] args) { int a=0; int b=1; System.out.println(a); System.out.println(b); for (int i = 0; i < 8; i++) { int c=a+b; System.out.println(c); a=b; b=c; } } }
For 52:00 Question No.5(Reverse a No.) , I have a more easier method:- public class ReverseMyNumber { Public static void main(String... args) { int n=28479; while(n>0) { int rem= n%10; Sytem.out.print(rem); n=n/10; } } } Make sure to write "print" instead of "println" in the output printing statement.
52:43 Even if you print the rem variable the answer will be the same i.e. reverse of that num, all you need to do is initialize the rem variable outside the while loop. THANK YOU for a clear explanation
I used this approach to reverse the number and its nicely working You can also check it out public class reverse { public static void main(String[] args) { int n = 2354735; int count = 0; while(n>0) { int rem = n % 10; count++; n = n / 10; System.out.print(rem); } } }
I love your answer, my solution was: //Q: Reverse the given integar int n = 16674; String numStore = "";
while(n > 0){ int last = n % 10; String lastString = Integer.toString(last); numStore += lastString; n /= 10; } int numInt = Integer.parseInt(numStore);
As per the question , we are taking two variables a and b and iterating over the entire series upto n by moving a and b to their respective position. While doing so we update a with b (a=b) and b with the result of a and b (b = a + b). But this won't work while coding. So we store b in a temporary variable (temp = b). And after updating b with the result of a and b(b = a + b) this ensures to retrieve the previous b value which is stored in temp variable. This temp variable will not tampered the previous b value even after updating the b with the result of a and b. And finally we are updating a with temp(a = temp) which is previous b value before updating result. I tried my best I hope this helps😅
@KunalKushwaha 52:09 why we are adding the numbers but we can simply do ...... public class reversingNumber { public static void main(String[] args){ int n = 28479; while (n>0){ int x = n%10; System.out.print(x); n = n/10; } } }
at 50:59 we can use print without multiplying with 10 public class reverse { public static void main(String[] args) { int a=83574; int nxt=0; while(a>0) { int mod=a%10; nxt=mod; System.out.print(nxt); a=a/10; } } } it's output is 47538 !!!!!
at 51:40 we do not need to multiply and add simply find remainder and print without using printl.. for eg: System.out.println("enter number:"); Scanner scn=new Scanner(System.in); int n=scn.nextInt(); while(n!=0){ int temp=n%10; System.out.print(temp); n=n/10;
Heyy Kunal!!! I read the comments!!!...They Just wanna tell you to post the videos early as soon as possible...As you started video on gaming...But they addicted with your java content and your confidence to do it...I am too addicted and wants you to post more Get Likes Comments and subscription....Glad to seee you ...Here again...Love you❤
HI! Great series In fibonacci series there is one missing condition as n=0 it will give 1 --as per video code so there should be an if-else at end so that if n=0 if will give 0 only. plz have a look on it.
for fibonacci series, taking 0 as 1st position, import java.util.Scanner; public class Fibo { public static void main(String[] args) { Scanner in = new Scanner(System.in); int n = in.nextInt(); int a = 0; int b = 1; int count = 2; System.out.println(a); System.out.println(b); while (count
Hi How's this playlist as m about to start but don't have time to explore then decide Already in 6 th so can u plz tell how's this playlist going on till now ?
i have one more solution for largest number:- import java.util.Scanner; public class temp { public static void main(String[] args) { Scanner value = new Scanner(System.in); int a = value.nextInt(); int b = value.nextInt(); int c = value.nextInt(); if(a>b){ System.out.println(a); } if(b>c){ System.out.println(b); } if(c>a){ System.out.println(c); } } } in this one is used the cyclic order of a>b>c or c>a>b or b>c>a
In the multiple if else statement part, if (salary > 10000) {salary += 2000} else if(salary > 20000) {salary += 3000} else{salary += 1000}, here both the if conditions are true, so the first if statement block will be executed and salary will be incremented by 2000 and then exit but the salary is > 20000 so it should be incremented by 3000. So, the if(salary > 20000) should be the first if statement I guess. Correct me if I am wrong. Thanks.
In the Video at the instance 6:24 , if we run the program only the first if condition is running , else if will not run ... for that i would suggest everybody to write 20000 in the if condition and 10000 in else if condition. Example: import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner input = new Scanner(System.in); int salary = input.nextInt(); if (salary > 20000){ salary += 3000; //salary=salary+3000 } else if (salary > 10000) { salary += 2000; //salary=salary+2000 } else { salary += 1000; //salary=salary+1000 } System.out.println(salary); } }
// 51:55 if we input 53210, Your solution ignores 0! output: 1235 // Another approach for reverse a number using String. public static void main(String[] args){ int n = 53210; String rev = ""; while (n > 0){ int num = n%10; rev = rev + num; n = n/10; } System.out.println(rev); } output: 01235
In the Video at the instance 34:00 , if we run the program only the first if we enter a valid alphabet then it will show whether it's uppercase or lowercase, but if we right any number it gives output as a Uppercase. correct code : import java.util.Scanner; public class CaseCheck { public static void main(String[] args) { Scanner input = new Scanner(System.in); char ch = input.next().trim().charAt(0); // check wether it's upper case or lower case // && and // || or if(ch >='a' && ch = 'A' && ch
I have a doubt,why did we use a loop in the calculator program? We could have made the program with just if else statements and then also it would run. Also I had just copied that calculator program from github and tried to run it on my intelij idea ,it was showing some errors. Can anyone help me?
Hii Is this course worth following as m.already in 6th sem n I don't have time in my hand to explore n then learn So can u please tell me how's this course 🙏
@@rishika9102 this is one of the best course till now I've seen,if your concepts are not much clear then no doubt you should go for this course,but if you're in 6th sem then I think you should look for a course which covers everything in shorter duration because it's your time for internship as well as placement,so start this only if you have some extra time.
Hey kunal bhai..in the multiple if else example shouldn't the condition be if ( salary> 10000 && < 20000 ) rather than only the first part? because if i take only the first part and run it and take a salary 22000.. as the program run it will check the first condition and it will satisfy that.. what i am saying is that shouldn't the conditions in multiple if else statements be disjoint?
Seriously, very helpful, i am able to think and execute logics on my own. You are just amazing. 47:00: Try this : public class CountNums { public static void main(String[] args) { String str = "12343"; int count = 0; for (int i = 0; i < str.length(); i++) { char c = str.charAt(i); if (c == '3') { count++; } } System.out.println(count); } }
Hi Kunal your work is amazing ...I've been working since last 7yrs in IT but I never know how to reverse number & Fibonacci series logic I was just remembering it as I never understood it Thanks brother seriously.
//Author : Harman kaur //purpose : Finding nth Fibonacci number package harman1; import java.util.Scanner; public class Fibnumber { public static void main(String[] args) { Scanner in = new Scanner(System.in); int x = in.nextInt(); int a = 0; int b = 1; for (int i =0; i
Addictive series seriously I am working professional have time issue in the working day but once I play your video can't leave without completing video
@@somuacharya6586 yes brother unfortunately it matters I think as I have seen max 2 to 3 year gap allows depending on company until you have exceptional skills.
@@somuacharya6586 brother never feel demotivated about your gaps just be ready to answer genuinely about . now comes to what to do part I'm not perfect one to give you any path but in my understanding you enough time to do anything as you are in college just learn java as you are from tire 3 learn DSA have some problem solving ability just to kunals course is hona help you totally don't looke for other things .. then you should learn development by choosing anything web development or mobile app development.. I know there are so many things AI and all but I would say intially don't go for that as I have made mistake only few opportunities are there for guys who is just graduated and have average skills .. so if you choose web development master HTML CSS Java Script and React framework make so many great project now one is going to stop you getting a job ASAP.
kunal can you please also start open source guide because many of us have completed a major portion of the basics and would like to get experience in open source. I know you are working very hard for us and you are busy with everything. but it would be great help if you just started somethings with open source also. please . I appreciate the hard work you are doing for the community.
the reverse q. can be done more easily if you use it like this int a = 1651654; while(a>0) { int rem = a%10; if(a>0) { System.out.print(rem); } a=a/10;
Is it only me or is there someone else also who is not getting the logic to solve questions and code before he explains? BTW your teaching is fantastic Kunal bhaiya
Hi Would you please share the code on how you used the if, else if and else statements. I have been trying to use the conditional statements for the past hour but the program is not being executed properly
Hi kunal Bhaiya, I want to do project in java for placements, my college taught me basics only, and after completing this bootcamp will i be able to do my own project or any suggestions that need to be followed. Please do reply, your reply might help me a lot.
DSA + interview preparation playlist: ruclips.net/p/PL9gnSGHSqcnr_DxHsP7AW9ftq0AtAyYqJ
Who the heck dislikes this😑. Thanks a lot for the efforts Kunal! Really appreciate it. The series has made me switch from Netflix to studying DSA 😂it's so addictive
cfc members 😂
@@aryansharma4775 Damn!😂🙏
Paid classes teachers was disliked this videos 😂😂😂
This Java DSA Series is so Addictive 😍
Thank You!
@@KunalKushwaha this frequency of posting tutorials every alternate day is much better than posting every day as it gives us time to practice properly instead of rushing to keep up with you
@@davs2002 He already mentioned that he'll upload all videos and it will be self paced. Most of us here are in final year and want to brush up all concepts clear before the placements starts so it'll be better if he uploads 1 video everyday.
Also you can watch videos alternate days and practice in between 😀
@@davs2002 bhai terko alternative day mei dekhni hai tho dekh sakta hai...par humare pass jada time nehi hai
@@uncalledbrake603 I am still in 2nd Sem 😀
This is actually THE MOST premium course in the World!
I think now everyone can see the Beauty of Java.
This course is very structured. Many tutorials explain concepts but ignore problem solving . Thank you kunal for this course
# GOD Of DSA
Hi I am a 11yr exp java guy was searching for some free course on youtube for DSA came accross your course and i just feel love in it...all in one place that too with java...i must say you have done very awsome work...your name will be there on this earth as long as DSA will be asked in interviews...May Supream Lord Vishnu Bless You..✌🙏
Hi Shubham, which tech stack are you working now?
Hey Kunal! Don't feel pressurized coz of the comments asking for more videos. The frequency and quality of your video is awesome! Cheers and take ur time! Thanks a lot for this commitment ;))
this comment should get a 💖
Bhaiya isme java language basics se padhai hai kya kyuki Mai beginner hu please reply
@@Siddharth3029 yes
Learning DSA has never been this much fun.
Bhaiya isme java language basics se padhai hai kya kyuki Mai beginner hu please reply
@@Siddharth3029 yes. its covering from the basics. go for it
Can u pls tell from where did u cover the topics mentioned
Awesomeeee🔥 i am literally addicted to this series.. this 2 day gap felt like a lifetime😂..
I uploaded 6 videos in 6 days what else do you want?
@@KunalKushwaha May be he is the one who already know basics 😁
@@KunalKushwaha are na na i didnt mean like that i just meant such is the quality of the content.. it makes waiting worth it😅.. sorry if i choose the wrong words
Bhai CIVO channel p v deveops ka bootcamp mein padha rhe h aur twitch p v Opensource(MLH) k liye kl podcast kiye the...so if you are interested in these, you may follow these videos.
More videos!!!
Many thanks, Kunal! 🤛 This lesson was a good opportunity for me to practice loops and conditions. Something that for many more experienced developers surely is daily business. I try to make it a habit to first write the pseudo code and the flowchart for the assignments and then I go over to code the solution in Java, JavaScript and Go. This takes a ton of time, but this way the stuff sticks in my old brain. I appreciate your contribution to free education. 🤝
Wonderful!
Favorite Line from all the lectures is: Very Simple Stuff
All of your videos from basic to advanced are unavoidable due to your super smart style of teaching. It's a gift for many of us beginner or experienced who so ever I believe.
You're very welcome!
@@KunalKushwaha one biggest plus point in all your teachings , you are successfully able to generate interest on such difficult topics like DSA of folks watching these videos in a true sense
I never stick onto RUclips lectures series for a long time. But this one has my ❤️
Hey seriously I am not getting anything what he is teaching but I completely want to learn what should I do. I don't know anything about coding.
@@iUtkarsh21 first learn C or C++ then you will understand , I also didn't understand anything but after learning C I can understand most of it.
no learn from durga sir no need of c i never learnt it @lakshaydahiya618 @I@@iUtkarsh21
Solving any problem flawlessly and with so ease. Wow! Your my new teacher. thanks for your simple and detailed teaching.
kunal, you have no idea how much this course is boosting my confidence....i wish one day i could meet you and thank you personally....
If I could, I would write this in every video: nobody dedicated so much on the internet to teach such complex subjects in a clear, crystal-clear manner, besides the amazing quality. And tks for teaching in English, I am a native Portuguese speaker and I have English as a second language, however, most of the good videos are available in Hindi and have no translation to English. Tk you forever!!
(I have you as a reference in terms of learning, better than all my professor in computer science college adding altogether)
Thank you
@@KunalKushwaha bhyia pls continue DSA series you're much much much better than those paid courses
@@harishrajwani3697 bhai kunal bhaiya ne dsa series complete kiyi to best series hogi
Kunal Sir, please continue the series. It would help all of us a lot 🤞🏻The quality you provide is unmatchable. 💥
I haven't seen.. Anyone teach better..than u Really.. Awsm..
kunal bhaiya i know you must be busy but adding a lecture of you doing an open source project using what we have learnt so far in this course will make it absolutely complete because what most of us lack is implementation and it'd mean the world to us if you'd think about it. Thank you for everything
+1
@@iqbalfirdousi9732 +2
+3 totally !!!
fr
honestly speaking, i m in 2nd yr, and this is the first time i could understand while loop, kudos man u r greattt
same here vroo....
Then how did you make it to 2nd year, if you don't even know basic loops 😂
noone could teach as better as kunal sir,mean my words guys this is the most understanding and easy explained coarse just follow the assignments question to build more confidence ,and see the result after a month that the level is increased,i highly appreciate this work done by kunal sir i wish i could meet and thanks for all this.
Dont't worry ! I am with you
Really appreciate your effort 6 videos in 6 days really excited to learn from you.
Every one can teach but no one teach like you 🥰🥰🥰
Waiting for your next video 😍😍🥰
I am enjoying the series by Kunal, literally binge watching this Kunal playlist. I tried to modify the calculator program here and added just a few logic: import java.util.Scanner;
public class Calculator {
public static void main(String[] args) {
// The calculator program tutorial by Kunal;
Scanner input = new Scanner(System.in); // takes in user input
// Calculation logic.
// should be a loop
while (true) {
System.out.println("Enter the operator to use ");
// takes the operand we'll be using
char op = input.next().trim().charAt(0);
if (op == '+' || op == '-' || op == '/'|| op == '*' || op == '%'){
System.out.println("Enter the 2 numbers to use ");
int res = 0;
int num1 = input.nextInt();
int num2 = input.nextInt();
boolean validCalculation = true;
if (op == '+') {
res = num1 + num2;
} else if (op == '-') {
res = num1 - num2;
} else if (op == '/') {
// But we cant divide a number by 0, it will throw an error.
if (num2 != 0) {
res = num1 / num2;
} else {
System.out.println("Hey there, this is not valid as it will return infinity");
validCalculation = false;
}
} else if (op == '*') {
res = num1 * num2;
} else if (op == '%') {
if ( num2 != 0) {
res = num1 % num2;
} else {
System.out.println("Hey there, this is will result to an error, cant have this");
validCalculation = false;
}
}
if (validCalculation){
System.out.println("Your result is " +res);
}
} else if ( op == 'x' || op == 'X') {
break;
} else {
System.out.println("Invalid Operator");
}
}
}
}
My god I'm amazed by the way u give us the way to build logic for problem-solving, thanks Kunal, never seen such an amazing playlist ever before, thanks, man!
Even my proffessor won't teach like that you.Great man kudos to you.
One of the best tutorials so far in RUclips (Java). Thank you Kunal
I literally just started this series and Oh my God this is pure gold!!,...thank you so much for simplifying everything for us
You are the best Programmer explaining DSA such a unique way in Java. I absolutely loved it!!!
Take precautions before watching this course
You will be addicted to this DSA course and fall in love with DSA 😄😆💯
Simple version for Fibonacci numbers :
import java.util.Scanner;
public class Fibonacci_number {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
System.out.print("Enter the no. of terms: ");
int n = input.nextInt();
int firstNumber = 0;
int secondNumber = 1;
System.out.println("Fibonacci number till" + n + "terms");
for (int i = 0; i
@sana shaikh yup! "nileshgarg0".
It should be n-2 ig?
@@mayureshpisat2274 for the nth Fibonacci we only need n - 1 and n - 2 element
here we take 2 variable
firstNumber and secondNumber
they are in the real sense last and second last
@@mayureshpisat2274 this question is for Dynamic programming and recursion
Bro I was planning to buy course of DSA JAVA from coding ninja and suddenly i searched on RUclips and start playing your videos .Now i am addicted to your channel.Thank you for uploading these quality course,you saved my money.❤❤❤
In those multiple if else statements , if salary >10000 and if salary>20000 are intersecting ones.
Eg: Let salary be 11000 , then according to the code it should give 13000 , which it will give .
But if you put salary> 20000 , for eg : salary= 22000 , it will not give us 25000 , but we will get the output as 24000. I know its nothing but its bit confusing for me so I thought i should comment so that a newbie wont get confused. Keep on going like this Kunal.
Thank you so much! I was actually looking for this comment. What is the solution to this? Is it putting greater than 10k and less than 20k in the first if statement?
@@parikshitpareek1993 if you want 10k-20k range , you be writing salary>10000 && salary
Q1 : using operators //Q:find maximum of three numbers
int max = a;
if (b> max && b > c){
System.out.println("The maximum number is : " + b);
}else {
System.out.println("The maximum number is : " + c);
}
}
public class fibo {
public static void main(String[] args) {
int a=0;
int b=1;
System.out.println(a);
System.out.println(b);
for (int i = 0; i < 8; i++) {
int c=a+b;
System.out.println(c);
a=b;
b=c;
}
}
}
Nice
This man has removed the fear of java from my mind!
Such a great course , I can't stop myself playing next lectures ...doing it one by one
For 52:00 Question No.5(Reverse a No.) , I have a more easier method:-
public class ReverseMyNumber
{
Public static void main(String... args)
{
int n=28479;
while(n>0)
{
int rem= n%10;
Sytem.out.print(rem);
n=n/10;
}
}
}
Make sure to write "print" instead of "println" in the output printing statement.
that program will be easier for paindrome too it works for both
same thought bro!
52:43 Even if you print the rem variable the answer will be the same i.e. reverse of that num, all you need to do is initialize the rem variable outside the while loop. THANK YOU for a clear explanation
Java DSA ...U MADE THE TOUGH ONE SO EASY . Hats off
Thanks for the wonderful lectures, theres not even a single day I skipped your lectures from the past week.
Glad you like them!
I used this approach to reverse the number and its nicely working
You can also check it out
public class reverse {
public static void main(String[] args) {
int n = 2354735;
int count = 0;
while(n>0) {
int rem = n % 10;
count++;
n = n / 10;
System.out.print(rem);
}
}
}
i also make this program
I love your answer, my solution was: //Q: Reverse the given integar
int n = 16674;
String numStore = "";
while(n > 0){
int last = n % 10;
String lastString = Integer.toString(last);
numStore += lastString;
n /= 10;
}
int numInt = Integer.parseInt(numStore);
System.out.println(numInt);
i don't understand the Fibonacci Program.
As per the question , we are taking two variables a and b and iterating over the entire series upto n by moving a and b to their respective position. While doing so we update a with b (a=b) and b with the result of a and b (b = a + b). But this won't work while coding. So we store b in a temporary variable (temp = b). And after updating b with the result of a and b(b = a + b) this ensures to retrieve the previous b value which is stored in temp variable. This temp variable will not tampered the previous b value even after updating the b with the result of a and b. And finally we are updating a with temp(a = temp) which is previous b value before updating result. I tried my best I hope this helps😅
@KunalKushwaha 52:09 why we are adding the numbers but we can simply do ......
public class reversingNumber {
public static void main(String[] args){
int n = 28479;
while (n>0){
int x = n%10;
System.out.print(x);
n = n/10;
}
}
}
at 50:59 we can use print without multiplying with 10
public class reverse {
public static void main(String[] args) {
int a=83574;
int nxt=0;
while(a>0)
{
int mod=a%10;
nxt=mod;
System.out.print(nxt);
a=a/10;
}
}
}
it's output is 47538 !!!!!
at 51:40 we do not need to multiply and add simply find remainder and print without using printl..
for eg: System.out.println("enter number:");
Scanner scn=new Scanner(System.in);
int n=scn.nextInt();
while(n!=0){
int temp=n%10;
System.out.print(temp);
n=n/10;
How do we evaluate our assignments. Are there assignment solutions available. please let me know.
both the ways are fine !! but creating a different variable that stores the reverse value will help later in palindrome questions.
Heyy Kunal!!! I read the comments!!!...They Just wanna tell you to post the videos early as soon as possible...As you started video on gaming...But they addicted with your java content and your confidence to do it...I am too addicted and wants you to post more Get Likes Comments and subscription....Glad to seee you ...Here again...Love you❤
51:57 another method to solve this is ,,
class Main {
public static void main(String[] args) {
long n = 198451318728144l;
long rev = 0;
while(rev
HI! Great series
In fibonacci series there is one missing condition
as n=0 it will give 1 --as per video code
so there should be an if-else at end so that if n=0 if will give 0 only.
plz have a look on it.
Your input was n = 0. Which makes the condition (count
One of the best. This will make pro. Kunal kudos
Day 10 of DSA learning ✅
Chup bkl
@@tysonryuk6664 wow so edgy
for fibonacci series,
taking 0 as 1st position,
import java.util.Scanner;
public class Fibo {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int n = in.nextInt();
int a = 0;
int b = 1;
int count = 2;
System.out.println(a);
System.out.println(b);
while (count
this course is in very detail for begginers
and covers all important concepts
Thanks a lot for such kindness where u r teaching DSA and not charging any penny...
You are really talented and you know how to teach others. Glad I found your channel to learn DSA. Thanks Kunal!
Bhaiya isme java language basics se padhai hai kya kyuki Mai beginner hu please reply
@@Siddharth3029brother kya tumne yeh start kia?
@@dherya__rakho nahi mai devlop sikh rahu hu abhi baad me dsa karunga
@@Siddharth3029 web dev? But why.... Agar tum Java pehle karte toh tumhe baad mei web d mei bhi asaani hoti
Good stuff 👍 Kunal . This series is gonna be great . Excited or what!
well explained than my college lecturer first i was hating java but now i am loving it
Its great DSA course ever, first time coding seems interesting😍
Thank you Kunal bhai!
Going to comment on each video so that youtube algorithm makes it reach more people:-)
Hi
How's this playlist as m about to start but don't have time to explore then decide
Already in 6 th so can u plz tell how's this playlist going on till now ?
i have one more solution for largest number:-
import java.util.Scanner;
public class temp {
public static void main(String[] args) {
Scanner value = new Scanner(System.in);
int a = value.nextInt();
int b = value.nextInt();
int c = value.nextInt();
if(a>b){
System.out.println(a);
}
if(b>c){
System.out.println(b);
}
if(c>a){
System.out.println(c);
}
}
}
in this one is used the cyclic order of a>b>c or c>a>b or b>c>a
In the multiple if else statement part, if (salary > 10000) {salary += 2000} else if(salary > 20000) {salary += 3000} else{salary += 1000}, here both the if conditions are true, so the first if statement block will be executed and salary will be incremented by 2000 and then exit but the salary is > 20000 so it should be incremented by 3000. So, the if(salary > 20000) should be the first if statement I guess. Correct me if I am wrong. Thanks.
Yes correct I also observed that.... i think we need to go in increasing order
In the Video at the instance 6:24 , if we run the program only the first if condition is running , else if will not run ... for that i would suggest everybody to write 20000 in the if condition and 10000 in else if condition.
Example:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int salary = input.nextInt();
if (salary > 20000){
salary += 3000; //salary=salary+3000
} else if (salary > 10000) {
salary += 2000; //salary=salary+2000
}
else {
salary += 1000; //salary=salary+1000
}
System.out.println(salary);
}
}
// 51:55 if we input 53210, Your solution ignores 0! output: 1235
// Another approach for reverse a number using String.
public static void main(String[] args){
int n = 53210;
String rev = "";
while (n > 0){
int num = n%10;
rev = rev + num;
n = n/10;
}
System.out.println(rev);
}
output: 01235
Dont't worry ! I am with you
n/10 karne pe why aren't we getting error coz it will convert number to double/float
In the Video at the instance 34:00 , if we run the program only the first if we enter a valid alphabet then it will show whether it's uppercase or lowercase, but if we right any number it gives output as a Uppercase.
correct code :
import java.util.Scanner;
public class CaseCheck {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
char ch = input.next().trim().charAt(0);
// check wether it's upper case or lower case
// && and
// || or
if(ch >='a' && ch = 'A' && ch
great video kunal, hands on learning. Feel so much more confident about programming in java.
Dont't worry ! I am with you
the best series on youtube even paid courses are not like this.. hats of to you kunal
Thanks for saving my career and my money... thanks🙏
You’re welcome
At 53:10 how the loop is calculating the answer, if there is no any updation mentioned?
This is the best lecture series so far.. Thankyou!
You're very welcome!
I have a doubt,why did we use a loop in the calculator program?
We could have made the program with just if else statements and then also it would run.
Also I had just copied that calculator program from github and tried to run it on my intelij idea ,it was showing some errors. Can anyone help me?
Hii
Is this course worth following as m.already in 6th sem n I don't have time in my hand to explore n then learn
So can u please tell me how's this course 🙏
@@rishika9102 this is one of the best course till now I've seen,if your concepts are not much clear then no doubt you should go for this course,but if you're in 6th sem then I think you should look for a course which covers everything in shorter duration because it's your time for internship as well as placement,so start this only if you have some extra time.
Hey kunal bhai..in the multiple if else example shouldn't the condition be if ( salary> 10000 && < 20000 ) rather than only the first part? because if i take only the first part and run it and take a salary 22000.. as the program run it will check the first condition and it will satisfy that.. what i am saying is that shouldn't the conditions in multiple if else statements be disjoint?
Seriously, very helpful, i am able to think and execute logics on my own.
You are just amazing.
47:00:
Try this :
public class CountNums {
public static void main(String[] args) {
String str = "12343";
int count = 0;
for (int i = 0; i < str.length(); i++) {
char c = str.charAt(i);
if (c == '3') {
count++;
}
}
System.out.println(count);
}
}
I hated Java when I tried to learned earlier but your Teaching ❤️❤️❤️
Hi Kunal your work is amazing ...I've been working since last 7yrs in IT but I never know how to reverse number & Fibonacci series logic I was just remembering it as I never understood it Thanks brother seriously.
//Author : Harman kaur
//purpose : Finding nth Fibonacci number
package harman1;
import java.util.Scanner;
public class Fibnumber {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int x = in.nextInt();
int a = 0;
int b = 1;
for (int i =0; i
Addictive series seriously I am working professional have time issue in the working day but once I play your video can't leave without completing video
@@somuacharya6586 yes brother unfortunately it matters I think as I have seen max 2 to 3 year gap allows depending on company until you have exceptional skills.
@@somuacharya6586 brother never feel demotivated about your gaps just be ready to answer genuinely about . now comes to what to do part I'm not perfect one to give you any path but in my understanding you enough time to do anything as you are in college just learn java as you are from tire 3 learn DSA have some problem solving ability just to kunals course is hona help you totally don't looke for other things .. then you should learn development by choosing anything web development or mobile app development.. I know there are so many things AI and all but I would say intially don't go for that as I have made mistake only few opportunities are there for guys who is just graduated and have average skills .. so if you choose web development master HTML CSS Java Script and React framework make so many great project now one is going to stop you getting a job ASAP.
Kunal your voice somewhat resembles to social media influencer, youtuber Angry Rantman at 0% anger. Like a cool Kunal javaman :)
Try YjR channel who talks about football he even looks a bit like him😂
kunal can you please also start open source guide because many of us have completed a major portion of the basics and would like to get experience in open source. I know you are working very hard for us and you are busy with everything. but it would be great help if you just started somethings with open source also. please . I appreciate the hard work you are doing for the community.
the reverse q. can be done more easily if you use it like this
int a = 1651654;
while(a>0)
{
int rem = a%10;
if(a>0)
{
System.out.print(rem);
}
a=a/10;
The thing you've done is just a reverse of that.
But the actual result should be also a number such that it is the reverse of an original number.
#Superb series Kunal Bhaiya
#one & only one😎
#Eazy to understand
#No.1 Java+DSA
Day 2 of the series, moving towards arrays now. Today's goal is to finish till lecture number 20
Is it only me or is there someone else also who is not getting the logic to solve questions and code before he explains?
BTW your teaching is fantastic Kunal bhaiya
thank you for such amazing playlist....😍Its really helpfull👍
Fibo code will Breck for 0 input coz it will return 1 here but i knew you had used this approach to make it simple.. Praise you for this great course.
a=1;
b=0;
for(i=1; i
Please continue till the end don't leave us at the middle and heartly Thank You to you from us
I will continue till end
This is Amazing bro! Learnt & practiced as well.
A question
At 28.40 shouldn't we take string rather than char ch 28:41
Love this course Sir
It is really amazing 🤩
Hey kunal I am telling you a funfact that you are a God level teacher
Reverse can be more easier when we use
while(num > 0){
Int rem = num%10;
System.out.print(rem);
num = num/10;
}
Hope u like it.
Great! but there is a tiny problem... you aren't storing it anywhere so technically you can't use it somewhere else
Like say outside the loop
Bhai Maine coding Ninja ka course buy kiya per ...tum usse bht jyada achhe se explain krre ho...waha pe mere concept clear nhi ho rhe the
Bro amazing stuff!!! You gave me approach how to crack question
Glad I could help!
OMG!! Thanks alot for replying me ❤️
23:46 your solution is very good. I used if, else if, and else to solve but you wrote using max. Never thought of that
Hi
Would you please share the code on how you used the if, else if and else statements. I have been trying to use the conditional statements for the past hour but the program is not being executed properly
thank you finally find a tutor whom gave great content ❤
Personal timestamp:
Day 1) 49:40
Day 2) 53:00
Day 3) 1:02:34
I have gone through a lot of DSA courses but this one is the top notch and even shouldn't be available for free...
Yes its really blessing to come through your channel lots of love❣️
Hi kunal Bhaiya, I want to do project in java for placements, my college taught me basics only, and after completing this bootcamp will i be able to do my own project or any suggestions that need to be followed. Please do reply, your reply might help me a lot.