Print matrix in spiral form. Print the 2-D array in spiral form.
Пікірлер: 153
@HendersonHood5 жыл бұрын
Very artfully described; this is by far the best explanation I have seen describing this algorithm.
@volcanopz62433 жыл бұрын
I cannot believe how easy this was, Thank you for such great explanation
@huzaifashaikh9323 жыл бұрын
I searched whole youtube but still wasn't satisfied with explanation, I got satisfied with only your explanation, it's the best explanation! keep posting new videos.
@ShinobiEngineer6 жыл бұрын
#include int main() { printf("THANK YOU ! ! !"); return 0; }
@daumtto5 жыл бұрын
Thank you sir. I think it was beyond my capabiliity of solving.. you made me understand this algorithm!
@aniketkhare86353 жыл бұрын
everything explained in a simple and easy manner. Thanks a lot !
@gujjulapradeepreddy31894 жыл бұрын
Excellent explanation. Please upload more and more algorithms. Really the best explanation for complex algorithms.
@hoanganh79973 жыл бұрын
i listen to a guy speak my mother language explain this and don't understand anything but i can understand it when listen to you , that't magical :)))
@jaswanthreddythummuru22104 жыл бұрын
You nailed it!. Clear-Cut explanation. Keep posting algorithms.
@shubhamaths2 жыл бұрын
Well explained ❤️ ignoring this video because of the Thumbnail but after watching all videos and still not understanding.. Then I clicked on this. ❤️ Agin it proves.. Don't judge a book by it's cover.
@kaveridhore4398 Жыл бұрын
This problem is tough for beginner and you made this an easy! Thankyou so much.
@NishantTaletiya Жыл бұрын
bahot bahot dhnyawad aapka. You explained it very easy and in briefly i understand it easily i think its very difficult but after your explaination it look like so easy.
@tapanjeetroy82665 жыл бұрын
Thanks for uploading it.. You are doing a great great job.. Please please upload more of such programming questions.. We really need it
@Jerry-by7cj6 жыл бұрын
Easy to understand, thank you so much! Impressive!
@AashishKumar-or9lu3 жыл бұрын
Love from Nepal ! Sir you describe from scratch like a pro
@riyanegi75024 жыл бұрын
Well explained!! Each and every step was made clear . I really liked the way you explained
@mdtaha23352 жыл бұрын
apko coding ata hai
@azeeztaiwo28025 жыл бұрын
you did a good job at explaining the way your algorithm work.
@danithakare8892 жыл бұрын
sir you are really great mentor to teach alogoritham please to be continue and help us we are ready to take paid up subscription also
@sazisgetaways14602 жыл бұрын
You nailed it. Thank you... beautifully explained
@shivakumarpatil29524 жыл бұрын
Very nice and clear explanation. Helped a lot.
@595959154 жыл бұрын
Awesome! Very simple and clear solution!
@nitin-vlogs31894 жыл бұрын
Your explanation is awesome sir
@neelparekh34484 жыл бұрын
Well explained and to the point. You've gained another subscriber.
@Avinashkumar-sw3rj5 жыл бұрын
Thanks a lot.way of explaining is awesome.
@NishantRathoreXYZ Жыл бұрын
Very helpful for me this video sir, I want to your all videos watch regularly jai hind for your motivation sir.
@rickychaitanya52163 жыл бұрын
The best exaplaination soo far :) Thank you sir
@renjithr76766 жыл бұрын
very nice Explanation. Algorithm would be super cool to understand if you change l to first_column and k to first_row
@PrashantNigam5 жыл бұрын
exactly
@SpectatorAlius4 жыл бұрын
@@PrashantNigam No, not exactly. The Java naming convention is camel case, not underscores. So firstCol and firstRow &c are much better.
@girishtoshniwal55634 жыл бұрын
This is really crystal clear explanation. However, don't you think two if conditions outside for loops got interchanged? Because when columns are variable, you should refer to variable 'L' in if condition instead of 'k' and when rows are variable, you should refer to variable 'k' instead of 'L'.
@krishnaghosh11266 жыл бұрын
Tomorrow is my ISC computer science practical 2018 ...this video is so helpful... great explanation sir😊
@GautamThapa-xs6ns3 жыл бұрын
So satisfied with your explanation thanks!
@ManishGupta-uj2kk6 жыл бұрын
i'm fan of your explanation......thnx.
@jokeofgames14092 жыл бұрын
Beautifully explanained
@tuhinchandra86753 жыл бұрын
Sir my heartiest thanks to u...❤️ amazing explanation.. I was struggling with this question for my practicalsss... Finally I understood the logic🙏
@dhruvinbhatt6414 Жыл бұрын
Very well explained 👍👍, thanks sir
@dhirajsinha81025 жыл бұрын
best explanation thank you for existing
@armanmanukyan19704 жыл бұрын
Excellent explanation. Many thanks.
@bryanblakeney88816 жыл бұрын
Learning so much from your videos. Thanks
@shamaparween76556 жыл бұрын
Ur explaination way is very gud..
@deniserea47743 жыл бұрын
Muy buena explicación!! Gracias
@manasranjan46 жыл бұрын
Really very nice explanation. Great man
@alyonachmil97812 жыл бұрын
Thanks. Very useful and understandable.
@bhupeshdavesar4 жыл бұрын
[Solved the exceptions and edge cases] good explanation but the solution gives wrong results(extra values) for 4*5 arrays, it gives 21 values instead of 20 , gives 26 instead of 24 for 4* 6 , throws exception for 2*5. One possible measure is, instead of printing in each loop , collect output in ArrayList using .add instead of prints and introduce a variable count (int count = m * n ) and check count < list.size and break the while loop if count == list.size Code for reference public static void main(String[] args) { System.out.println(printSpiral( new int[][] { { 4, 5, 3, 3, 6 }, { 4, 5, 1, 7, 8 }, { 4, 5, 3, 3, 6 }, { 4, 5, 1, 7, 8 }})); } private static List printSpiral(int[][] arr) { // printSpiral(arr, 4, 5); return printSpiral(arr, arr.length, arr[0].length); } private static List printSpiral(int[][] arr, int m, int n) { List outputList = new ArrayList(); int firstRow = 0, firstColumn = 0, lastColmn = n - 1, lastRow = m - 1, elementCount = m * n; while (firstRow
@ridhamkaria87716 жыл бұрын
explanation was from basic.Nice one. make a video on structure problems.
@АсылжанБотахан-ъ7э3 жыл бұрын
Thank you so much friend!! Now I can say easy-peasy, lemon squeezy 'bout this task!
@rishavraj35473 жыл бұрын
Are you cs go player 😂
@sr_sudipta4 жыл бұрын
It was simply awesome........thanks sir....
@Ashwanikumar-qr2jj2 жыл бұрын
best explanation for beginners.
@ganeshjaggineni4097 Жыл бұрын
NICE SUPER EXCELLENT MOTIVATED
@dileepkumarnag49675 жыл бұрын
very nice explanation sir
@Kaifa_ali6 жыл бұрын
very nice explaination youre killing it
@adolfocarrillo2484 жыл бұрын
Challenge here. Can you design an algorithm which prints out a line corresponding to a certain line equation? The line must be printed on a square Matrix, with any symbol you want like asterisks.
@VishnuPillai026 жыл бұрын
Thank You :) Well Explained.
@softwareengineering1012 жыл бұрын
Awesome explanation
@analyticstamizan6774 жыл бұрын
superb...explaination sir..
@mchapman00716 жыл бұрын
Hi, first of all thanks for this explanation! It really helped. I also have a question. Why did you create the if statements k
@ArunKumarKarepu6 жыл бұрын
After while condition is satisfied, k is increased by one after first for loop and last_col is decreased by one after second for loop. So in order to traverse other values, these conditions needs to be checked.
@annakhomidova46872 жыл бұрын
Thanks a lot for explanation! This is wery helpful!
@rudrajha1002Ай бұрын
God for this question sir !!!!💕💕💕💕💕💕💕💕💕💕😊😊😍😍
@dhananjayjadhav70643 жыл бұрын
When I search for an que and got you vidio my face is like 😊😊😊
@rosonerri-faithful3 жыл бұрын
Thank you Sir. It was helpful 😄. Can you post the explanation video for Goldmine collection and sudoku problem?
@koushikkumar4816 ай бұрын
where are you sir your explanations are awesome hats off
@__sarik4 жыл бұрын
really good explanation
@praveenraj86746 жыл бұрын
Superb explanation
@rudrajha1002 Жыл бұрын
Superb sir...❤
@gammax54465 жыл бұрын
thanks for our explaination...Great work!!
@vimalv63413 жыл бұрын
very well explained but only one thing was missing i.e complexity by the way complexity is O(m*n)
@darshansolanki55354 жыл бұрын
You are the best
@software856963 жыл бұрын
Does this algorithm work if the number of rows >= to the number of columns?
@sonubansal62204 жыл бұрын
it helped me alot thanks
@vishalkajale50734 жыл бұрын
good explanation.
@ZuleyenineIbneNoman5 жыл бұрын
hey bro,I watched your video and you did a great job.pls make a video on backtracking and sieve of eratosthenes
@darkoluketic1774 жыл бұрын
Rely bro u are the best.... u make this for idiots like me... sub
@prashanttiwari1207 жыл бұрын
great source to learn programming
@RichValuedIndia5 жыл бұрын
*TQ bro* tmrw is my exam 😍
@divyansheevarshney24764 жыл бұрын
awsmm explanation
@anandraj98593 жыл бұрын
Explanation 🔥🔥🔥🔥🔥🔥🔥
@riaganesha5 жыл бұрын
Awesome video 👏🏻
@kiranbs50573 жыл бұрын
Good Job . Thank you
@sandeepraja14706 жыл бұрын
Can you please explain the logic to print a matrix in spiral form starting from center (printing outwards)?
@orkhanibrahim3 жыл бұрын
what about printing not from row and column index from 0,0 .For example how can we print from 1,1
@bhavyar29865 жыл бұрын
amazing!! happy to subscribe!
@kidsfun3815 жыл бұрын
Realy nice explanation
@vishwasmukund6 жыл бұрын
Nice series !! Can you please cover matrix rotation clockwise and anti clockwise when you get a chance ?
@noobkirti82162 жыл бұрын
Sir make video on objects oriented programming 🙏
@ermattonella4 жыл бұрын
THANKS FOR THE HELP SIR
@abhinavjangra74466 жыл бұрын
Print matrix diagonally ..??
@nasiruddinkhan56655 жыл бұрын
very well explained
@abhisekhagarwala95015 жыл бұрын
sir i have implented exactly same code as yours but it prints some garbage value ...
@sam_s33442 жыл бұрын
Amazing explanation. Do you have the code for this?
@rishikumarvirenkumarmehta96354 жыл бұрын
Thank you so much.....
@banothramesh90216 жыл бұрын
Sir thanks for good explanation I need different type of output with explanation and explain what conditions are used
@kiranki20075 жыл бұрын
Well explained .
@atanasgeorgiev70737 жыл бұрын
THANK YOU!!! :)
@tarungoyal21133 жыл бұрын
nice explanation don't focus on these 40 ppl they are mad
@smbehindyou7 жыл бұрын
the parent while block it should be - > while(k
@oggyjack646 жыл бұрын
you can right it also but in the previous line m-1 and n-1 were allocated to last_row and last_col respectievely...
@qpwug8s1d7rhf6 жыл бұрын
Nice explanation. Could get the same info in half the time though.
@sssumeet2 жыл бұрын
🙌
@AshwaniKumar-bh8rl6 жыл бұрын
nice explanation
@STFTadka3 жыл бұрын
Thanks Sir
@the-gray-haired-developer5 жыл бұрын
please add more videos on matrix related problems
@akhilsinghsanoria12585 жыл бұрын
in step 3 we have to print last row ,so why we do not mention that we are printing lastrow