Print matrix in spiral form. Print the 2-D array in spiral form.
Пікірлер: 152
@HendersonHood4 жыл бұрын
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
@Jerry-by7cj5 жыл бұрын
Easy to understand, thank you so much! Impressive!
@jaswanthreddythummuru22103 жыл бұрын
You nailed it!. Clear-Cut explanation. Keep posting algorithms.
@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 !
@huzaifashaikh9322 жыл бұрын
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.
@595959154 жыл бұрын
Awesome! Very simple and clear solution!
@krishnaghosh11266 жыл бұрын
Tomorrow is my ISC computer science practical 2018 ...this video is so helpful... great explanation sir😊
@GautamThapa-xs6ns2 жыл бұрын
So satisfied with your explanation thanks!
@azeeztaiwo28025 жыл бұрын
you did a good job at explaining the way your algorithm work.
@ShinobiEngineer6 жыл бұрын
#include int main() { printf("THANK YOU ! ! !"); return 0; }
@tapanjeetroy82665 жыл бұрын
Thanks for uploading it.. You are doing a great great job.. Please please upload more of such programming questions.. We really need it
@bryanblakeney88815 жыл бұрын
Learning so much from your videos. Thanks
@Avinashkumar-sw3rj4 жыл бұрын
Thanks a lot.way of explaining is awesome.
@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.
@rickychaitanya52162 жыл бұрын
The best exaplaination soo far :) Thank you sir
@gujjulapradeepreddy31893 жыл бұрын
Excellent explanation. Please upload more and more algorithms. Really the best explanation for complex algorithms.
@sazisgetaways14602 жыл бұрын
You nailed it. Thank you... beautifully explained
@gammax54465 жыл бұрын
thanks for our explaination...Great work!!
@tuhinchandra86752 жыл бұрын
Sir my heartiest thanks to u...❤️ amazing explanation.. I was struggling with this question for my practicalsss... Finally I understood the logic🙏
@shivakumarpatil29524 жыл бұрын
Very nice and clear explanation. Helped a lot.
@kaveridhore4398 Жыл бұрын
This problem is tough for beginner and you made this an easy! Thankyou so much.
@AashishKumar-or9lu2 жыл бұрын
Love from Nepal ! Sir you describe from scratch like a pro
@prashanttiwari1206 жыл бұрын
great source to learn programming
@Kaifa_ali6 жыл бұрын
very nice explaination youre killing it
@armanmanukyan19703 жыл бұрын
Excellent explanation. Many thanks.
@shubhamaths Жыл бұрын
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.
@VishnuPillai026 жыл бұрын
Thank You :) Well Explained.
@deniserea47742 жыл бұрын
Muy buena explicación!! Gracias
@shamaparween76555 жыл бұрын
Ur explaination way is very gud..
@nitin-vlogs31893 жыл бұрын
Your explanation is awesome sir
@neelparekh34483 жыл бұрын
Well explained and to the point. You've gained another subscriber.
@hoanganh79972 жыл бұрын
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 :)))
@dhirajsinha81024 жыл бұрын
best explanation thank you for existing
@danithakare889 Жыл бұрын
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
@bhavyar29865 жыл бұрын
amazing!! happy to subscribe!
@riyanegi75023 жыл бұрын
Well explained!! Each and every step was made clear . I really liked the way you explained
@mdtaha23352 жыл бұрын
apko coding ata hai
@ManishGupta-uj2kk5 жыл бұрын
i'm fan of your explanation......thnx.
@alyonachmil9781 Жыл бұрын
Thanks. Very useful and understandable.
@sr_sudipta4 жыл бұрын
It was simply awesome........thanks sir....
@jokeofgames1409 Жыл бұрын
Beautifully explanained
@NishantRathoreXYZ10 ай бұрын
Very helpful for me this video sir, I want to your all videos watch regularly jai hind for your motivation sir.
@dhruvinbhatt6414 Жыл бұрын
Very well explained 👍👍, thanks sir
@analyticstamizan6774 жыл бұрын
superb...explaination sir..
@ridhamkaria87715 жыл бұрын
explanation was from basic.Nice one. make a video on structure problems.
@praveenraj86745 жыл бұрын
Superb explanation
@manasranjan46 жыл бұрын
Really very nice explanation. Great man
@softwareengineering101 Жыл бұрын
Awesome explanation
@atanasgeorgiev70736 жыл бұрын
THANK YOU!!! :)
@riaganesha4 жыл бұрын
Awesome video 👏🏻
@ganeshjaggineni40979 ай бұрын
NICE SUPER EXCELLENT MOTIVATED
@rudrajha100210 ай бұрын
Superb sir...❤
@Ashwanikumar-qr2jj2 жыл бұрын
best explanation for beginners.
@dileepkumarnag49675 жыл бұрын
very nice explanation sir
@kidsfun3815 жыл бұрын
Realy nice explanation
@girishtoshniwal55633 жыл бұрын
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'.
@renjithr76765 жыл бұрын
very nice Explanation. Algorithm would be super cool to understand if you change l to first_column and k to first_row
@PrashantNigam5 жыл бұрын
exactly
@SpectatorAlius3 жыл бұрын
@@PrashantNigam No, not exactly. The Java naming convention is camel case, not underscores. So firstCol and firstRow &c are much better.
@vishwasmukund6 жыл бұрын
Nice series !! Can you please cover matrix rotation clockwise and anti clockwise when you get a chance ?
@__sarik3 жыл бұрын
really good explanation
@divyansheevarshney24763 жыл бұрын
awsmm explanation
@banothramesh90215 жыл бұрын
Sir thanks for good explanation I need different type of output with explanation and explain what conditions are used
@sonubansal62203 жыл бұрын
it helped me alot thanks
@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.
@sandeepraja14705 жыл бұрын
Can you please explain the logic to print a matrix in spiral form starting from center (printing outwards)?
@sarojsahoo87634 жыл бұрын
Thanks a lot !
@ZuleyenineIbneNoman4 жыл бұрын
hey bro,I watched your video and you did a great job.pls make a video on backtracking and sieve of eratosthenes
@nasiruddinkhan56655 жыл бұрын
very well explained
@kiranbs50573 жыл бұрын
Good Job . Thank you
@rosonerri-faithful3 жыл бұрын
Thank you Sir. It was helpful 😄. Can you post the explanation video for Goldmine collection and sudoku problem?
@AshwaniKumar-bh8rl5 жыл бұрын
nice explanation
@ermattonella4 жыл бұрын
THANKS FOR THE HELP SIR
@kiranki20074 жыл бұрын
Well explained .
@darshansolanki55353 жыл бұрын
You are the best
@anandraj98592 жыл бұрын
Explanation 🔥🔥🔥🔥🔥🔥🔥
@abhinavjangra74466 жыл бұрын
Print matrix diagonally ..??
@the-gray-haired-developer5 жыл бұрын
please add more videos on matrix related problems
@vishalkajale50733 жыл бұрын
good explanation.
@user-bi4gr7mr9g3 жыл бұрын
Thank you so much friend!! Now I can say easy-peasy, lemon squeezy 'bout this task!
@rishavraj35472 жыл бұрын
Are you cs go player 😂
@sssumeet2 жыл бұрын
🙌
@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!
@koushikkumar481Ай бұрын
where are you sir your explanations are awesome hats off
@software856963 жыл бұрын
Does this algorithm work if the number of rows >= to the number of columns?
@rishikumarvirenkumarmehta96353 жыл бұрын
Thank you so much.....
@9-19392 жыл бұрын
🔥🔥
@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
@saketpanchori64805 жыл бұрын
can you tell me how to use this in main function?
@dhananjayjadhav70642 жыл бұрын
When I search for an que and got you vidio my face is like 😊😊😊
@NehaKumari-cx6un3 жыл бұрын
👌👌👌
@sam_s33442 жыл бұрын
Amazing explanation. Do you have the code for this?
@debojyotidas32606 жыл бұрын
Sir I have created the code of the matrix by my concept the program executed and displayed the matrix in spiral order but it shows array out of index.why is it showing it?
@balladofgaytony57254 жыл бұрын
because there was a mistake in code on desk.in first for change i=1 to i=0; because first index of array is 0
@noobkirti82162 жыл бұрын
Sir make video on objects oriented programming 🙏
@ankitabhise38833 жыл бұрын
How to do Reverse spiral matrix?
@qpwug8s1d7rhf5 жыл бұрын
Nice explanation. Could get the same info in half the time though.
@gogoipe4 жыл бұрын
Thank you boy
@abhisekhagarwala95015 жыл бұрын
sir i have implented exactly same code as yours but it prints some garbage value ...