// Question 7 - Finding out the minimum element of Array int[] arr2 = {-1, -4, 53, -32, -6, 92, 10, -372}; int min = Integer.MAX_VALUE; for (int elem: arr2) { if (elem < min) { min = elem; } } System.out.println(min);
@alirazanawazishali6862 Жыл бұрын
Thanks
@musicpulse.mp3Ай бұрын
or you can keep the int min = arr2[0]; that also works.
@realheckertrustmebro2 жыл бұрын
This is actually funn, Watching this video at 2 AM, Understanding something new in the silence of night, I watched your 2D array video 4 times before moving ahead and it turns out that i understood array but was having difficulty with understanding nested loops, i needed to watch some other videos about nested loops to understand them, i am not complaining about that, this playlist is awesome, a single person cannot handle everything so perfectly but you still made it perfect!! Thankyou for this amazing Playlist and listing it on the internet for free, You are not teaching a youtube user, you are shaping the Indian future!
@shubhanshukushwaha61502 жыл бұрын
That's the quality that Harry bhai had
@gaming0peration27 Жыл бұрын
I also have the same problem. Can you tell me from where you cleared nested loops ?
@aamir46848 ай бұрын
same bro i am also watching his video at 4:00 am in the silence of night🥰
@ankurddank_afmishra11966 ай бұрын
@@gaming0peration27 codeitup
@sejalsanjayvamja6 ай бұрын
I have same problem. Nested loop is hard
@rock89382 жыл бұрын
//To find minimum element in an array public class Main { public static void main(String[] args) { int [] arr={1,8,4,9,23,2,-3,5}; int min=arr[0]; for(int element: arr){ if(element
@harshgaming-ce9zl Жыл бұрын
26:17 we can use the - - from the length to 0 then this will be solve i have example int [] a = {1,2,3,4}; // for (int i = a.length-1; i>-1; i--) // { // System.out.println("Reverse Number is = " + a[i]); // }
@vkumar10663 жыл бұрын
Clearing the doubts in Q5 . Many people had this confusion.. For reversing the array. brother you have to reverse the array. Not just u have to print the values in reverse. think on it once. Earlier I also used to think the same way. But got cleared. In the method explained by harry bhai he is trying to reverse the actual array and that is what the question is about. The question is not to print the array in reverse order.
@AshishKhetwal6 ай бұрын
same confusion i had! thanks !
@amarkumarsahu92954 ай бұрын
Same confusion !! Thnx
@pragandebnath39153 ай бұрын
Use two array that's similar to your process , just store the values in reverse order of one into other and equate them later
@pankajsanwlot633Ай бұрын
public class arrayrev { public static void main(String[] args) { int [] group ={58,69,25,14,6}; for(int i=group.length-1 ;i>=0;i--){ System.out.print(group[i] + ","); } } } it just print it reversed.. not completely reverse the whole Array
@KajalSingh-xg8jp2 жыл бұрын
These practice problems make concepts much more clear. Thank you so much Harry sir!
@soumyashreemohapatra74883 жыл бұрын
It's just fabulous. I'm a computer science student but when I read the array concept in the college it was not as clear and understanding as this videos. Thank you Harry sir for giving us such fabulous free course video!!!!
@Sameer00121 Жыл бұрын
29:03 instead of going through broader way ,we can reverse an array by this way int [] arr = {1,2,3,4,5,6,7,8,9}; int l = arr.length; for(int i=l-1;i>=0;i--) { System.out.print(arr[i] +" "); } above program i think is simplest way to reverse an array
@dakshpatel1769 Жыл бұрын
Yeah bro
@sunitashaw3818 Жыл бұрын
but the concept he showed is really imp
@vaibhavnayak34162 жыл бұрын
System.out.println("Problem number 8"); int min = Integer.MAX_VALUE; for (int i : array) { if (i < min) { min = i; } } System.out.println(min); Thanks for this amazing course
@Yavi6095 ай бұрын
: operator is work like ternary operator ?
@Spacifist3 ай бұрын
@@Yavi609no ....check FOR EACH LOOP VIDEO IN THIS COURSE ITS AFTER ARRAY VDO
@zeeshanali4502 Жыл бұрын
i started learning from apna college untill i found you they are good in theoretical part but for better understanding it needded practical knowledge and thats what u r giving us thanks harry bhaiya u r doing great work for everyone
@paragkaushik95953 жыл бұрын
shortcut way of reversing an array: int age[] = {23,21,20,30,29,28}; for(int i=age.length-1; i>=0; i--){ System.out.print(age[i]+" "); }
@pushpendradubey93123 жыл бұрын
Same
@Nadaniyaaa3 жыл бұрын
But here the problem is that you have just printed the array in reverse order...and not actually reversed it...like by that logic used in the video,you are actually changing the value stored at the i th address with the value stored at( l-i-1)th address..and in whole reversing the array
@meetupadhyay94543 жыл бұрын
I have done the same thing ..but I think swapping array elements is also an interesting thing to learn
@anujraj03 жыл бұрын
Yeah I also use this simple method but i don't know why harry bhai has used long method.
@arpitmishra16223 жыл бұрын
@@Nadaniyaaa Awesome point, i got it thanks
@Mayank-yz5nn4 жыл бұрын
This is the only channel whose video I watch in full screen!!😁
@Shraddhaz_Guitar_Vibes Жыл бұрын
Mtlb ?? 🤔
@aishwarya18954 жыл бұрын
Great work bruh... Though I am not learning java right now but i saw your notification and came here to support your video✌😁
@iarpit__khandelwal4 жыл бұрын
Please Tell Harry Sir
@aishwarya18954 жыл бұрын
@@iarpit__khandelwal what?
@iarpit__khandelwal4 жыл бұрын
@@aishwarya1895 Please Tell Me How To Solve This Problem Harry Sir Ne Aapka cooment like kar diya but problem ka answer nhi diya
@felon_loser4 жыл бұрын
Same here, I am in the middle of you Python course right now! Just completed Akhbaar Padhke Sunaao
@artishsharma78594 жыл бұрын
@@iarpit__khandelwal ego or attitute😡
@Manu_Sharma9 Жыл бұрын
Practice Problem 1 - 1:06 Practice Problem 2 - 4:44 Practice Problem 3 - 9:29 Practice Problem 4 - 11:19 Practice Problem 5 21:17 Practice Problem 6 37:19 Practice Problem 7 43:15
@raorao7329 Жыл бұрын
Thanks bro
@hiteshjoshi3061 Жыл бұрын
Thanks Bro
@Piyush-me9nu2 жыл бұрын
To find max and min element in an array :- import java.util.Arrays; public class Practise_Q24 { public static void main(String[] args) { // To find maximum element in an array int [] array = {1,2,3,7,5,6,4}; System.out.println(Arrays.stream(array).max()); System.out.println(Arrays.stream(array).min()); // Or you can also use this method :- int max = Integer.MIN_VALUE; for(int e : array){ if(e>max){ max = e;} } System.out.println("The maximum element in this array is: "+max); int min = Integer.MAX_VALUE; for(int m: array){ if(m
@eaglehunter64873 жыл бұрын
//Question 7 //Write a Java program to find the maximum element in a Java array. int []arr={1,2,3,4,5,6}; int min=Integer.MAX_VALUE; for(int element:arr){ if(element
@siddiquizaid43153 жыл бұрын
Maximum array find kar rha hai to min kyu likha hai
@Aspect_GT3 жыл бұрын
@@siddiquizaid4315 sahi hai uska
@AshishKumar-pq6pr2 жыл бұрын
Last line jara samjhaana bhai.... kyoon likha???
@ankitasingh7343 жыл бұрын
Practice set is the heart of your teachings, to grasp every concept.
@awesomeadarsh70123 жыл бұрын
this is one of the toughest video in this playlist (till this video)
@pubgclutches84813 жыл бұрын
Fuck yeah
@pubgclutches84813 жыл бұрын
Matrix wala to smjh hi nhi aya mujhe
@rajsinghparihar16953 жыл бұрын
right bro questions are bit difficult for beginners
@suhail95113 жыл бұрын
To be honest mene pura video nahi dekha or mene sirf sari problems solve kardi, it wasn't tough at all, I mean some questions are tricky but not tough...
@parththakkar97483 жыл бұрын
@@pubgclutches8481 i marked this video 3 months back when i was watching this series and now when i arrived here second time trust me every question seems easy to me and the concepts were eye opening sometimes
@Rohit-0019 Жыл бұрын
For finding minimum element code int [ ]arr={12, 849, 0, 93, 01, 87}; int i; int min=arr[0]; for(i=0;i
@apurbadutta8675 ай бұрын
in this way it will give the max value you need to use > this sign bro
@hitarthshah55498 ай бұрын
Question number 7 : public class CWH_29_Practice_Set_6 { public static void main(String[] args){ int [] arr = {1,2,25,56,78,789}; int min = Integer.MAX_VALUE; for(int element: arr){ if(element < min){ min = element; } } System.out.println("Minimum element in the array: "+min); } } Output : Minimum element in the array: 1 42:46 Yes Sir understanding the concepts clearly. Thank you very much!
@toshitsingh72703 жыл бұрын
40:40 putting max=arr[0] instead of max=0, would be better. It will work for both negative and positive integers(all integers) in the array. And if the array is empty then we could put if else statement to check if length of array is 0 or not.
@atirrasheedhashmi2 жыл бұрын
Yeah, You were right as it will check each element within given array 👍 Thank You
@mnabeel7276 Жыл бұрын
Wow! brilliant
@Ronit785 Жыл бұрын
Thanks 👍then it will work for minimum also, the process of harry was working for only max not for min🙂
@KUMARARYANCSE--8 ай бұрын
Yes its working for min but how can you tell plese?
@krishnawadhwani53933 жыл бұрын
This Is The Best Video Of The Playlist BTW Now I Am 1 Star On Code Chef
@alexparker42203 жыл бұрын
Age And Class?
@eaglehunter64873 жыл бұрын
42:44 Harry bhai maza hi aa gaya. WOnderful course. The best channel for learning Java, Python etc.
@everysecond68722 жыл бұрын
It is good. I was learning 1 video everyday. From past few weeks couldn't keep up everyday but trying my best. Loving that i am learning JAVA programming.
@MuhammedAbbas-hb6od2 жыл бұрын
41:45 Minimum value int [] arr = {120, 330, 50, 80, 69}; int min = Integer.MAX_VALUE; for (int e:arr){ if (e
@sachinprajapatkd3 жыл бұрын
// Write a Java program to find the minimum element in a Java array. int []arr={109,23,44,155,66}; int min=Integer.MAX_VALUE; System.out.println(min); for (int e:arr) { if (e
@saternal76034 жыл бұрын
//Harry you can easily reverse an array this way. No use of complexity int[] result = { 0, 0 ,0 ,0 ,0}; int [] array = { 14 , 22 , 43 , 44 , 45}; int counter = -1; for(int i=4;i>=0;i--) { counter++; result[counter] = array[i]; } for(int element:result) { System.out.print(element +" "); }
@deepanshusaini62422 жыл бұрын
your code is complex os do this int [] f= {1,2,3,4,5}; for (int g=f.length; g>0; g--){ System.out.println(g); }
@manjunathn52512 жыл бұрын
you guys are just printing it in a reverse way and not actually reversing the values of it
@vijayvinith41543 жыл бұрын
Well, ive been late to this by quite a bit but I've been enjoying learning coding alongside you and one day even though im pursuing electrical engineering, this gives me hope that one day I'll be able to earn a good paying job in the IT sector
@cybergrand1021 Жыл бұрын
43:09 // Question 7 answer submission; int min = arr[0]; // Assume the first element as the minimum for (int e : arr) { if (e < min) { min = e; } } System.out.println(min);
@Luffy_2804 Жыл бұрын
float [] num = {12.5f , 13.8f , 101.02f , 99.99f , 78.7f}; float store = 0; for(int i =0; i
@himankjeshwar86362 жыл бұрын
30:54 - We can also solve this problem using decrementing for - loop
@HamzaShahzadEB_2 жыл бұрын
Yes that is easy but this is sorting and searching type solution 🙂
@41gaurav9hb22 жыл бұрын
In decrementing for - loop the array is not reversed only the elements are printed in reverse order but here the array in reversed, if you print array by Arrays.toString(array) then you find the whole array is reversed....
@semicolon64992 жыл бұрын
This method be use for Data Structure also we need to understand this algorithm .
@randomgaming22802 жыл бұрын
Decrementing for - loop method is easy
@abhishekvishwakarma90454 жыл бұрын
Best JAVA series from beginner to advanced 😉😉👌🔥
@itskeshhu4 жыл бұрын
21:19 Don't you think it's lot easier to reverse an array by using the following code😉 But your method also taught me some new concept. System.out.print("Thanks!") 👇👇👇 int marks[]={95, 96, 95, 96, 86}; for(int i=marks.length-1; i>=0; i--){ System.out.println(marks[i]); }
@CodeWithHarry4 жыл бұрын
Hi Keshav, This is not reversing the array but printing the array in reverse order.
@itskeshhu4 жыл бұрын
@@CodeWithHarry thanks for correcting me😄
@hrushikeshthorat82384 жыл бұрын
I thik you can store the array in temp variable then print temp It will print an reverse array and will not change the original value Temp[i]=marks[i]; System. Out.print(Temp[i]);
@shauryaagarwal68344 жыл бұрын
@@CodeWithHarry i agree sir
@sharannarsingi7578 Жыл бұрын
//Practice question 7 : int[] x = {324,24,24,52,45,34,635,653}; int min = Integer.MAX_VALUE; for(int e: x) { if(e < min){ min = e; } } System.out.println("The value of the minimum number is : " + min); }
@manjindersidhu76202 жыл бұрын
Seriously Boht mza aaaaa rha hai ji………. 😋😇
@vishalvishu18172 жыл бұрын
the loops are really really hard atleast for me as a beginner and i am unable to build logic in most of these question but i still think the problem will be solved sooner or later if i will keep following your videos so *THANKS A LOT* for putting this great effort
@maazahmad34052 жыл бұрын
same here bro, it's quite difficult for beginners
@prakashpatne33012 жыл бұрын
Same here bro🤔🤔
@Luffy_2804 Жыл бұрын
what's the progress now
@amey1723 Жыл бұрын
yes bro same condition
@OdishaStudyTime4 жыл бұрын
5:10 problem-2 (i tried to solve this in less number of codes) int [] a ={2,3,4,5,6}; int b=4; for( int element:a) { if (b==element){ System.out.println("The number is present"); } }
@krishanjaat22394 жыл бұрын
8107769230
@darpanneupane61213 жыл бұрын
try printing is not present as well
@top10creation844 жыл бұрын
int [] arr ={1,2,3,4,5,6,7,8,9}; int min =Integer.MAX_VALUE; for (int element :arr) { if (element < min) min = element; } System.out.println("The minimum value in array is"+min);
@spradhan53163 жыл бұрын
👍
@paarthsarthy2 жыл бұрын
int a = 34; int b = 78; b = a+b; a = b-a; b = b-a; just another logic to swap two numbers! Great Course!
@FPPMOHIT2 ай бұрын
20:00 if your 'vs code' also don't give the output - update first and print later.
@anushkakumari5213Ай бұрын
How to update vs code bro please reply me 😢😢
@FPPMOHITАй бұрын
@@anushkakumari5213 no , vs code ko update nahi karna hai cade ko pehle update karo like in this code we are printing first and after updating the value you need to update first and than print. Code- public class AddingTwoDArray { public static void main(String[] args) { int [][] mat1 = {{1,2,3}, {4,5,6}}; int [][] mat2= {{45,32,56}, {34,56,34}}; int [][] ResultSUM ={{0,0,0}, {0,0,0}}; for (int i=0;i
@LiTtLeGyAnBySubhash4 жыл бұрын
Java course k liye maine v request kiya tha Harry, 😎 So thanx for this amazing course 😊
@cuberkam90724 жыл бұрын
30:00 //Harry bhai u can easily reverse an array in this way for(int i = a.length-1; i>=0;i--){ System.out.print(a[i]); }
@cuberkam90724 жыл бұрын
Why did you make it so complex😂
@gaurangvishnoi89954 жыл бұрын
The same question is in my head right now.😁
@saternal76034 жыл бұрын
it prints but doesnt reverse the array
@cuberkam90724 жыл бұрын
@@saternal7603 o yes thanks for telling Sorry Harry Bhai Maine ache se nahi dekha
@ytuser01012 жыл бұрын
This is not reversing the array but printing the array in reverse order.
@rajkumarverma46454 жыл бұрын
You are the person who actually contribute in others life
@biswajeet98265 ай бұрын
Can't believe this is free!! That's why this is Underrated!!
@shamlikolhe56305 ай бұрын
You know what I just can't control myself saying "I LOVE YOU HARRY BHAI". U are great. I am from mechanical background still able to code; this is just because of YOU.
@sauravsharma84614 жыл бұрын
I am actually watching your python series ( for beginners ) that you made 2 years ago . Just wanna say thanks !
@felon_loser4 жыл бұрын
me too
@programmer40474 жыл бұрын
CodeWithHarry Channel Dheeme-Dheeme Bekaar Hota Jaa Rha Hai ... Uske Purane Courses Kafi Acche The .... Ab *Notes* Wali Video Aati Aur Watchtime Ke liye Video Ko Faltu Me Bada Bana Diya Jaata Hai ... Ab Sirf School Wale Bachcho Ko Target Kiya Jata Hai ( Notes Bana Ke ) Aur Machine Learning / Angular / React Jaisi Cheeze To Khatm Hi Ho Gyi Hai I am Watching CodeWithHarry Since He Had 40K
@sauravsharma84614 жыл бұрын
@@programmer4047 thanks for the info .
@abhixtech91954 жыл бұрын
Bro you can watch codewithharry python in one video new one 2 years ago videos are so old some commands doesn't work now u can right codes in visual studio code pycharm is not good so much visual studio code is good
@felon_loser4 жыл бұрын
@@abhixtech9195 i dunno about that. i started coding from HTML, and used VSCode then. When I begun python, i tried pycharm, but couldn't install it. that is why is use VSCode too
@vaibhavpatil82973 жыл бұрын
at 41:06 we can rather use int max = arr [0]; so now our default max value is first value of array and it will get updated if any next value in array is bigger(or smaller if we want to find minimum). so we can use this rather than finding max and min values possible in data type integer Harry bhai full to maja aa raha hai course me at this point mai addict ho gya hu coding se sirf aapki vajah se
@crimsonx17723 жыл бұрын
we can also swap the elements without using the temp variable arr[i] = arr[i] + arr[l - i -1]; arr[l - i -1]= arr[i] -arr[l - i - 1]; arr[i] = arr[i] - arr[l-i-1];
@DeepakKumar-fk6sx Жыл бұрын
no
@Entertainmentvideo235082 жыл бұрын
You are one of the best teacher in the world!
@MohammedMufish_Shaikh2 жыл бұрын
Tagda course bro .😎👌👌👍👍
@dorababuarig7654 жыл бұрын
These practice questions are really very helpful. Thankyou Harry bayya for your hardwork and dedication. Thankyou
@saudagaransar71352 жыл бұрын
such an amazing practice set, learned so many things in this video , thanks harry bhai.
@Saurabhsr172 жыл бұрын
puri playlist k baad puri java aa jayegi ???
@saudagaransar71352 жыл бұрын
@@Saurabhsr17 if tumne practice kiye ache se to definitely, bus tutorial hell me mat fasna
@yashu1703 Жыл бұрын
@@saudagaransar7135 what u want to say by ur 2nd statment, i don't understand
@saudagaransar7135 Жыл бұрын
@@yashu1703 i mean that dont just watch video, do practice as well
@yashu1703 Жыл бұрын
@@saudagaransar7135 ok
@razinmaksudahmedkarimi83673 жыл бұрын
Bhai question 5 ko esse kar te to easy rehta bohot int[] i={3,4,5,2,3,1}; int k=i.length-1; for(k=i.length-1;k>=0;k--){ System.out.println(i[k]);
@vkumar10663 жыл бұрын
brother you have to reverse the array. Not just u have to print the values in reverse. think on it once. Earlier I also used to think the same way. But got cleared. In the method explained by harry bhai he is trying to reverse the actual array and that is what the question is about. The question is not to print the array in reverse order.
@kajolkeshri653 жыл бұрын
@@vkumar1066 you know what, i was also thinking the same thing but after reading your comment i Got my answer
@avinashmishra9053 жыл бұрын
@@vkumar1066 brother then how to write plz mention the code..still confused
@vkumar10663 жыл бұрын
@@avinashmishra905 code is already is the video. I will try to clarify. pls focus on these two lines. The question is to reverse the array means if an array is {1,2,3,4} then think of another array which is {4 ,3,2,1}. what do you notice here? they are reverse of each other not because i have written in reverse order but they are also stored in reverse order. and that is question, we dont have to just print it in reverese. but we also have to store it in reverse order. so that the actual array is reversed. But in case of just printing array the actual array remains same.
@ashishdisawal34432 жыл бұрын
Alternate solution for Practice Problem 5; int [] arr = {1,2,3,4,5,6}; int n = Math.floorDiv(arr.length, 2); int temp; for (int i = 0;i
@yashmahajan7141 Жыл бұрын
What is math. Abs
@ajaygangwani4854 Жыл бұрын
It is used to return the absolute value that is it always returns a positive value@@yashmahajan7141
@beatzff2865 ай бұрын
another way of solving question.no.5 int[] array = new int[5]; array[0]=2; array[1]=6; array[2]=9; array[3]=3; array[4]=7; for (int elements:array){ System.out.println(elements); } System.out.println("Before Swapping the array"); int i=0,j= array.length - 1,temp; while(i
@sparshkapoor1343 жыл бұрын
woah these questions are literally amazing
@tejashwinihosur17122 жыл бұрын
Got to know many things in this practice set.💫✨🙏🏻Thanks Harry Bhai
@avdhootbhuvad19474 жыл бұрын
This practice set was very helpful for me. Learn many new things thanks to you . Keep it up Harry bhai ♥
@gurunehra47022 жыл бұрын
For que 5. We can just make tempArray and perform following 1 line in for loop tempArray[i] = array[array.length-i-1] And then assign our original array with this tempArray by writing array = tempArray And that's it a for loop with one like code And assigning is enough. As i think.
@msp101003 жыл бұрын
this tutorial is hard
@PanditAyushparashari7 ай бұрын
Nope this is very very easy
@tirthraval2257 ай бұрын
It has to be to make your brain force to work and think
@AryanSingh-dj5bj4 ай бұрын
Mfs like you who don't even understand a single word comment like this just to be cool 😂...keep it up kid !@@PanditAyushparashari
@sumitsinghal1868 Жыл бұрын
Question 4 I have done using scanner in which user can input the values in the matrix and the add them. import java.util.Scanner; public class Question_4 { public static void main(String[] args){ Scanner s=new Scanner(System.in); //Asking elements to store in the Matrices; int[][] mat1=new int[2][3]; int[][] mat2=new int[2][3]; for(int i=1;i
@maskedgamer4016W2 ай бұрын
The easier method is this bruh import java.util.*; class Practice { public static void main(String[] args) { Scanner sc = new Scanner (System.in); System.out.println("Enter the elements of the first & second array (alternatively)."); int[] [] a= new int[2][3]; int [] [] b = new int[2][3]; int [] [] c = new int [2][3]; for (int i = 0 ;i
@namanjain99414 жыл бұрын
harry sir, apn practice problem 5 ko ese bhi solve krr skte thee thoda easy ho jata //Question no.5 - Write a java program to reverse an array class Main{ public static void main(String[] args) { int [] array = {1, 2, 3, 4, 5, 6}; int l = 0; for (int i = 5;i>=l;i--){ System.out.print(array[i]); System.out.print(" "); } } }
@ajayshekhawat22923 жыл бұрын
Harry bhai ka code koi bhi general array k liye hai Lekin tumhara code sirf array= (1,2,3,4,5) k liye hi work karega
@arceus95943 жыл бұрын
Btw Que. 5's name has to be Swapping Array Instead Of Reverse Array
@prathameshmalode55243 жыл бұрын
//why this didnt give reverse of array.i made array wanting input by user import java.util.Scanner; public class practice { public static void main(String[] args) { Scanner sc= new Scanner(System.in); System.out.println("how many elements do you want to enter"); int num = sc.nextInt(); int [] elements = new int[num]; for (int i = 0; i
@ajayshekhawat22923 жыл бұрын
@@prathameshmalode5524 I
@prathameshmalode55243 жыл бұрын
@@ajayshekhawat2292 sry my mistake
@SamyakJain-on5wu Жыл бұрын
at 34:53 we can do int [] marks = {1,2,3,4,5,6,7,8,9,10}; for(int i=marks.length-1;i>=0;i--){ System.out.println(marks[i]); } this to reverse an array in question 5
@ankithati_08822 жыл бұрын
42:38 public class minvalu { public static void main(String[] args) { int [] arr = {50,-146,72,856,-722}; int min = Integer.MAX_VALUE; for(int element : arr){ if(element
@ankushpagarwar958211 ай бұрын
maja aa gya
@boro37754 жыл бұрын
Please start ds in algo in Java with this java series in continuity 🙏🙏🙏🙏🙏
@sureshlankavalasa59983 жыл бұрын
Yeah please Harry bhai
@IronMan-or1xf4 жыл бұрын
Sir can u pls create a seperate playlist for python projects only?? It will help me a lot so that I can easily practice projects and can also create some projects by my own, This is my kind request, I hope u will help me
@tejalchavan13444 жыл бұрын
He has already made one for practice programs, it's almost similar and u should check it out
@Vansh_K103 жыл бұрын
System.out.println("QUESTION 7" + " "); int arrya []={35 , 57 , 02 , 996 , 1102 , 4685 , 7 , 5 , 1 , -326 }; int min = Integer.MAX_VALUE; for (int e:arrya){ if(e
@devtomar84725 ай бұрын
Good 👍😊 Bahut aanand aa raha hai 😊😊 brother
@PrathamCreations2 жыл бұрын
Harry bro , for problem no 5 ... what if we don't swap the number ..instead we use a reverse for loop to print array?
@faisalshafiq26162 жыл бұрын
i have the same doubt as i have done it in a much shorter code ????//
@codyandersan9 ай бұрын
No, the question says you have to actually reverse the array, not just to print it in reverse order..
@rajatshukla77544 жыл бұрын
Sir can you please explain how to take input of array elements from user using keyboard Thank you❤
@thelastpuff3564 Жыл бұрын
you can use scanner for taking input to an matrix import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.print("Enter the number of rows: "); int rows = scanner.nextInt(); System.out.print("Enter the number of columns: "); int cols = scanner.nextInt(); int[][] matrix = new int[rows][cols]; System.out.println("Enter the matrix elements:"); // Taking input for the matrix for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { matrix[i][j] = scanner.nextInt(); } } // Printing the matrix System.out.println("Matrix entered:"); for (int i = 0; i < rows; i++) { for (int j = 0; j < cols; j++) { System.out.print(matrix[i][j] + " "); } System.out.println(); } } } try this
@Mayank-yz5nn4 жыл бұрын
Sir, it's getting complex. Difficult to understand 😭
@akaza86154 жыл бұрын
Then watch again
@KGFFan-kw9cj4 жыл бұрын
in 2d array
@rohananand82533 жыл бұрын
Yes then watch again this video
@salmanmehmood1803 жыл бұрын
this is replacement of answer 5 int [] rev={6,5,4,3,12,1}; for (int i=rev.length-1;i>=0;i--){ System.out.println(rev[i]); }
@gametimewitharyan66653 жыл бұрын
To understand it better, just first listen the question and then try to solve it by yourself, and if you are not able to solve then watch the solution for answer and understanding
@unroyalrawreal40192 жыл бұрын
for practice problem 2 (without using for each loop and boolean) :- int [ ] nm = {8,9,10}; for (int i =0; i
@rajarishabhsingh82962 жыл бұрын
Bole to mja aa gya 🤟🤩 thanku harry bhaiya
@suprabhatnandi85984 жыл бұрын
Hi,Just want to know by when you will complete this java playlist,just a rough estimate.
@royfamily92732 жыл бұрын
Concepts Pura clear ho gaya Harry Bhaiya maja hi aagaya ekdam.
@shantanupanditiitdelhi5515 Жыл бұрын
Maja aa gaya , Harry Bhai !!
@mightyprogrammer28992 жыл бұрын
harry bhai question no 5 practice problem no. 5 // to reverse an array element what a lesson yrr superb idk how to thanks Thank you so much.
@ramphapal6610 Жыл бұрын
Maja Aa gaya😊 bohat hi Aachhye the problem,, or bohat kuch sikhane ko mila,, thanks harry bro❤
@DanteHanma-l6q Жыл бұрын
bhai agar aapka video se concept clear nhi hua toh mereko nhi pata kiske yahaan se hoga. great job bhai keep going😍😍😍😍😍
@69shintrehrishikesh53 Жыл бұрын
Best tutor of Java I have had until now ❤❤
@samyakjain4308 Жыл бұрын
35:57 class main{ public static void main(String[] args){ float [] marks = {56f,87f,45f,23f,87f,34f,65f,54f,78f,3f,43f}; float [] swap= new float [marks.length]; int j =0; for(int i = marks.length - 1;i>=0;i--){ swap[j] = marks[i]; j++; } for(float element: swap){ System.out.print(element+" "); } } }
@faizanjan1022 жыл бұрын
46:24 we can also use ---------------------------------- for (int i=1; i h[i]){ isSorted = false; break; } }
@ytuser01012 жыл бұрын
can you tell me why in second loop -1 was used (int i=0; i
@hameedferoz8804 Жыл бұрын
Sabse Best Practice Set tha ye. Thank you Harry Bhai
@ashutosh54062 жыл бұрын
maza aa raha h harry bhai... thank you so much bro. you're doing great work for our country.
@biggestcomeback-w8x29 күн бұрын
everything is temporary but "right click karke run karna hai" is permananent" and also thanks for your videos .i am currently studying in class 10 and your videos helped me a lot(till video no 66.) in my boards... batch 2024-2025.......love from bihar....
@NoobCoder6232 жыл бұрын
Best video on all concepts of array at beginners level. Best explanation.May god bless you for giving us this course ❤️❤️.
@chetnabansal370 Жыл бұрын
Needless to say that videos are full of new concepts and fun. Earlier I thought, in order to reverse the array we could just start iteration from arr.length till 0 but it didn't work (of course, how stupid was I !). Idk if you will ever read my comment or not but I literally want you to say a big THANK YOU !!
@randomx7629 Жыл бұрын
try arr.length-1 till 0...coz last index is not equal to arr.length
@miracleatom86802 жыл бұрын
Sachii Amazing lectures Good Job MashaAllaha !!!!!!!
@chetanranghani96952 жыл бұрын
int [] arr = {5, 2100, 3, 455, 5, 34, 67}; int min = Integer.MAX_VALUE; for(int e: arr){ if(e
@abhinavrawat20486 ай бұрын
man you are too good when it comes to explaining things...thank you so much
@maytan147511 ай бұрын
24:33 to reverse a string : public class demo { public static void main(String[] args) { int[] array= {1,2,3,4,5,6}; for(int i =array.length-1;i>0;i--) { System.out.print(array[i]+" "); } } }
@abdulwahabkaladgi202710 ай бұрын
public class Arrays { public static void main(String[] args) { String [] months = {"January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"}; for (int i=months.length-1; i>=0; i--){ System.out.println(months[i]); } } } this one executed perfectly
@AnimeFusionHub252 жыл бұрын
Bhai MAZA hi AAGAYA...kya hi concepts Explain kara hai
@lakshaybhatia96912 жыл бұрын
Very creative and good questions ......we have learned new concepts ....Thanks a lottt.....❤❤❤❤💕💕💕💕
@10arryasarkarxb152 жыл бұрын
THANKS BHAIYA KYA BADHIYA REVESION KARVAYA HAI BEFORE EXAMS!😁
@user-wx3px7fy7r Жыл бұрын
Roasting mai carry or code mai Harry are the best😂❤❤
@YouTubeKAYDEN2 жыл бұрын
Course awesome hai Bahut achi tarah se samajh me aagaya hai Thanks Harry Bhai 💯🤩😍🤗👍
@manavsatasiya10182 жыл бұрын
41:40 we can also find min value like this public static void main(String[] args) { int []arr = {1,2,3,4,34,-3,68,22}; int max = 0,min=0; for(int i=0;i
@faizan_moazim_1233 ай бұрын
21:17 Practice Problem 5 simple way // Practice Problem 5 int[] arr = {10,20,30,40}; // arr.length -1 = length ko minus karo and print kro or reverse array found for(int i = arr.length -1; i >= 0; i--){ System.out.print(arr[i] + " "); }