Spiral Traversal - Solution | 2-D Arrays | Data Structure and Algorithms in JAVA

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 ธ.ค. 2024

ความคิดเห็น • 164

  • @lokeshnegi5051
    @lokeshnegi5051 3 ปีที่แล้ว +63

    before watching this video i was thinking the problem is so tough,but sir your explanation really changed my mind.

  • @nishantsharma8776
    @nishantsharma8776 4 ปีที่แล้ว +45

    mene pure youtube par aisa koi tutor nahi dekha you are extraordinary.and you deserve more Subscribers.mughe to ye samagh nahi aa RHA log etna accha channel leave krke or channels ko 100-100K subscriber kaise de dete hai

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +22

      bhai linkedin/fb pe ek post likh do, ya college mei webinar kra do. Viewers ko pta chal jaega. Sabka bhla hoga. Hmara bhi, bacho ka bhi

    • @shivendrapathak8480
      @shivendrapathak8480 4 ปีที่แล้ว +4

      @@Pepcoding you are an extraordinary teacher and you are doing so much effort to prepare us from zero to pro level.I'm referring to all my friends to join this channel.
      Thankyou! so much sir.

    • @ashishSinghSengar17
      @ashishSinghSengar17 3 ปีที่แล้ว +2

      @@Pepcoding I'll surely write about your channel on Quora and LinkedIn. You're one of the finest teacher I ever saw. Kaash, aapke channel k baare m pehle pata hota. Now, I'm in 6th sem, still have one year left. Learning from you everyday, sir.

    • @abhishekanand5898
      @abhishekanand5898 3 ปีที่แล้ว +2

      @@ashishSinghSengar17 It is never too late bhaiii...jb start ki tab accha...pelo accha se..

  • @DevilaBakrania
    @DevilaBakrania 3 ปีที่แล้ว +27

    Blown away by the explanation!! Hats Off you made it super smooth + I remembered the logic right away ! This is my first video of Pepcoding.. You made it so easy.

  • @rohitmadaan6679
    @rohitmadaan6679 2 ปีที่แล้ว +1

    I tried this question in which spiral starting from left... my code passed in all test cases... thanks for the wonderful explanation ... now i'm perfect in this question. thanks alot

  • @vishalpuri9360
    @vishalpuri9360 3 ปีที่แล้ว +4

    haven't seen a teacher like you before
    i wish i could meet you in my life ; you are legend sumeet sir. My coding skills are improving day by day nd it is just because of you sir. you are really a god for me sir you are the best teacher. lots of respect and love from my side sir.

    • @rayedsafdar3684
      @rayedsafdar3684 2 ปีที่แล้ว +1

      Just keep practicing and you'll meet him when he'll take ur interview

  • @democrats9579
    @democrats9579 3 ปีที่แล้ว +5

    What an Explanation! This is amazing. Thank You!

  • @kritikasharma3331
    @kritikasharma3331 2 ปีที่แล้ว

    Best teacher in the world !!! I'm amazed by the explanation.

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      Glad you loved it! For better experience and well organised content sign up on nados.io and start learning.

  • @CSBDPSAHITHIRANI
    @CSBDPSAHITHIRANI 3 ปีที่แล้ว +3

    You make any difficult problem very very simple. Thank you so much!!

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว +3

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      th-cam.com/users/Pepcodingabout?view_as=subscriber

  • @faizanhaider3953
    @faizanhaider3953 2 ปีที่แล้ว

    Sir aapne jo smjhaya h naaa... Kasam se maza aagaya... Bahut jbr10

  • @afzalriz449
    @afzalriz449 2 ปีที่แล้ว

    most underrated channel. Great Explanation. 👏

  • @piyush_sh98
    @piyush_sh98 2 ปีที่แล้ว

    Most underrated channel for coding 🙌

  • @ishanshah3309
    @ishanshah3309 3 ปีที่แล้ว +1

    This is seriously good explanation. I mean his explanation made this leetcode medium problem look like a very easy problem.

  • @akshayagrawal2222
    @akshayagrawal2222 2 ปีที่แล้ว

    Sumit bhai you are great...kitna simple explaination

  • @asan9657
    @asan9657 3 ปีที่แล้ว +1

    Maza Agaya sir
    I wish I could study the complete syllabus of DSA from you👌

  • @mohammedabdulaziz4400
    @mohammedabdulaziz4400 2 ปีที่แล้ว

    Kya baat hai sir, kyaabbaat hai sir!!. Yeh baat hai sir!

  • @sanyasareen393
    @sanyasareen393 4 ปีที่แล้ว +1

    Sir, Aapne bohot achhe se explain kiya hai solution. Sab samjh aa gya thank you

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      I am glad. Keep learning.

  • @tanmaythaker2905
    @tanmaythaker2905 4 ปีที่แล้ว +3

    What an explanation! Loved it!

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +1

      Glad you liked it!

  • @neelshah4812
    @neelshah4812 4 ปีที่แล้ว +2

    sir
    i think it should be (cnt

    • @vedantgolash6084
      @vedantgolash6084 4 ปีที่แล้ว +2

      its starting from 0 , so sir wala correct hai

  • @BronsonMendonca
    @BronsonMendonca 2 ปีที่แล้ว +1

    Thank you for this super simple explanation!!

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      Glad it was helpful! for better experience and well organised content sign up on nados.io and start learning.

  • @yogeshpandey730
    @yogeshpandey730 2 ปีที่แล้ว

    very well explained, i can't find such an easy explanation over internet . Thank you Sumeet sir.

  • @shashankchaturvedi7876
    @shashankchaturvedi7876 3 ปีที่แล้ว

    best teacher on you tube

  • @tubakhalid5222
    @tubakhalid5222 3 ปีที่แล้ว +1

    You are one of a kind sir ! Gonna enroll in your course very soon !!!!

  • @venom3380
    @venom3380 2 ปีที่แล้ว

    Thankyou for the videos Sir! hoping to complete most of it by the end of 2022😄

  • @yogeshmusale1188
    @yogeshmusale1188 2 ปีที่แล้ว

    Thank you for teaching this program.🙏🙏

  • @amangupta4914
    @amangupta4914 2 ปีที่แล้ว

    Visiting first time but i must say i m totally impressed...such a smooth teaching

  • @satyaganesh672
    @satyaganesh672 2 ปีที่แล้ว

    bro ur a saviour.. ur explanations are god level explanations

  • @sayantansadhu6380
    @sayantansadhu6380 2 ปีที่แล้ว

    Extremely beautiful and simple explanation ❤️

  • @PROTECHRAHUL
    @PROTECHRAHUL 3 ปีที่แล้ว +1

    Easiest explanation ever😎

  • @thesurajpatade
    @thesurajpatade 3 ปีที่แล้ว

    Amazing explanation, planning to binge watch all problems!!

  • @azeemali6865
    @azeemali6865 2 ปีที่แล้ว

    the best explanation ever...

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @iffyaiyan8942
    @iffyaiyan8942 4 ปีที่แล้ว +1

    Thanks for this video Sir, it cleared all doubts related to this type of problem

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      You are most welcome

  • @justaRidhaMthinGs
    @justaRidhaMthinGs ปีที่แล้ว

    rather than write count and total elements just write "if(maxr < minr ) return; " after the loop of bottom wall

  • @abhinavvgoyall
    @abhinavvgoyall 2 ปีที่แล้ว

    Made it so simple. thank you!

  • @24381498
    @24381498 3 ปีที่แล้ว

    Amazing explanation Sumeet sir. Thanks

  • @acciocoder6596
    @acciocoder6596 3 ปีที่แล้ว +1

    Awesome sir...really loves alot ur way of explaining

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Thanks a ton. For better experience visit on nados.pepcoding.com
      Also follow our Instagram account to stay updated.
      instagram.com/pepcoding/

  • @codelite700
    @codelite700 2 ปีที่แล้ว

    Sir made the while loop terminating condition so damn simple & cool.

  • @neelshah4812
    @neelshah4812 4 ปีที่แล้ว +1

    sir, you make the explanation very interesting nd addictive..maza aagya

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      Keep watching

  • @rounakjoshi6680
    @rounakjoshi6680 2 ปีที่แล้ว

    Loved the way to teach🙏

  • @abhishekvishwakarma9045
    @abhishekvishwakarma9045 2 ปีที่แล้ว

    awesome explanation sir, I will never forget this logic

  • @naman63865
    @naman63865 4 ปีที่แล้ว +1

    sir you are doing a great job.Thankyou sir.

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      Thanks and welcome

  • @puneetgupta2060
    @puneetgupta2060 4 ปีที่แล้ว

    Apke tutorial bahut ache hai sir thanks for making the vedio

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like my efforts, I request a review
      g.page/Pepcoding/review?rc

  • @hinamankani5319
    @hinamankani5319 4 ปีที่แล้ว +1

    Wow i m so glad,i did this question on my own😊😊

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +1

      Yay!! I am glad too. Keep learning

  • @sharikkumar8581
    @sharikkumar8581 3 ปีที่แล้ว

    Bahut khubsurat explanation sir....thank you :)

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว +1

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @mohsinimam2048
    @mohsinimam2048 3 ปีที่แล้ว

    Thank for such an easy explanation!

  • @anandkumar-ko5ok
    @anandkumar-ko5ok 3 ปีที่แล้ว

    great work pepcoding

  • @nipunsharma2670
    @nipunsharma2670 2 ปีที่แล้ว

    very nice explanation .Thanku sir!!

  • @geetanegi2736
    @geetanegi2736 4 ปีที่แล้ว +1

    🔥🔥mza agya. Jai ho sir ki.

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +1

      thank you for motivation beta

  • @Satishkumar-rx7oy
    @Satishkumar-rx7oy 2 ปีที่แล้ว

    this video is really helpful, thanks for making this

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      Glad it was helpful!
      Keep learning.
      And for better experience, visit nados.io, where you will get well curated content and career opportunities.

  • @shreyanshjamuar8921
    @shreyanshjamuar8921 3 ปีที่แล้ว

    Bro maza aa gya yaar,you r awesome sir.

  • @nandankakadiya1494
    @nandankakadiya1494 3 ปีที่แล้ว

    Simply amazing 🔥

  • @arvindg553
    @arvindg553 3 ปีที่แล้ว

    Best on youtube

  • @abhisheksoti1115
    @abhisheksoti1115 3 ปีที่แล้ว

    Hello Sir, Big Fan, great explanation... but there is one small improvement that I could think of...instead of checking cnt < tne inside the for loop condition, if we could add
    if(cnt == tne){
    break;
    }
    between left and bottom, bottom and right, right and top, there would be a few less condition checks in total.
    I have started practicing on NADOS, great platform Sir. Thank you so much.

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      For better experience and well-arranged content
      visit- nados.pepcoding.com
      Also you can post your query on community tab.
      Don't forget to follow us on Instagram
      instagram.com/pepcoding/

  • @satadrumondal8671
    @satadrumondal8671 3 ปีที่แล้ว +1

    Sir great video 👌.Sir I request you to put more program on array and recrusion.

  • @rohitmadaan6679
    @rohitmadaan6679 2 ปีที่แล้ว

    Great explanation, Subscribed❤

  • @sakshiaggarwal6199
    @sakshiaggarwal6199 3 ปีที่แล้ว +1

    Thank you so much sir!! You're amazing

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Keep supporting and keep loving Pepcoding😊

  • @deepanshusaxena7471
    @deepanshusaxena7471 ปีที่แล้ว

    Great explaination.

  • @amannegi8256
    @amannegi8256 3 ปีที่แล้ว +2

    G.O.A.T

  • @akshivmittal1188
    @akshivmittal1188 11 หลายเดือนก่อน

    mazza aa gya

  • @shashwatkrishnashukla2284
    @shashwatkrishnashukla2284 3 ปีที่แล้ว

    SIR you are OP,pls make a video on spiral traversal of 3D matrix too

  • @santanukumar5714
    @santanukumar5714 3 ปีที่แล้ว

    at 5:17 can u explain why u take j< arr[0].length instead of arr.lenghth

    • @santanukumar5714
      @santanukumar5714 3 ปีที่แล้ว

      @@nikhilflautist ya sir i understand it
      And thank u for giving time to clear my doubt👍.

  • @bite027_ketansharma6
    @bite027_ketansharma6 2 ปีที่แล้ว

    maza aa gya!

  • @akshyananda7219
    @akshyananda7219 3 ปีที่แล้ว

    Awesome explanation. Thank you sir

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว +1

      Glad to know that you liked the content. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem. If you like our efforts, will you like to write a review about us here - g.page/Pepcoding/review?rc

  • @shivamverma-mt6kp
    @shivamverma-mt6kp 2 ปีที่แล้ว

    Thanks a lot, Sir

  • @shivanshm1
    @shivanshm1 4 ปีที่แล้ว

    ur best bro....such an intersting lecture...

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      Thanks a ton. thanks for motivation

  • @vipulkumar3752
    @vipulkumar3752 3 ปีที่แล้ว

    very helpful thank you sir

  • @deepanshum5967
    @deepanshum5967 3 ปีที่แล้ว

    Thankyou so much sir

  • @Iamnoone56
    @Iamnoone56 3 ปีที่แล้ว +1

    shandaar jabardast zindabaad sir..aaj tulsidas hote to DSAcharitramanas likhte apko idol mnake ;P

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Haha...thankyou😋
      If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

  • @ArnabJhaYT
    @ArnabJhaYT 3 ปีที่แล้ว

    Best explanation ever 😁😁😁

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Glad you liked it but for better experience and precisely arranged content.
      visit - nados.pepcoding.com

    • @ArnabJhaYT
      @ArnabJhaYT 3 ปีที่แล้ว

      @@Pepcoding Yes sir, I am currently coding in nados and coming here for video solution

  • @arvindg553
    @arvindg553 3 ปีที่แล้ว

    U r awesome awesome awesome sir

  • @jayantaghosh5259
    @jayantaghosh5259 3 ปีที่แล้ว +1

    Thank you sir🥺🥺

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      You are welcome and If you like our efforts, please upvote the comments written by the students about Pepcoding here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

    • @kamalnayan5331
      @kamalnayan5331 3 ปีที่แล้ว

      @@Pepcoding Upvoted sir.

  • @vikaskumarnitrr
    @vikaskumarnitrr 2 ปีที่แล้ว

    Dekho bhai aisa hai
    Nahi koi sumeet sir jaisa hai

  • @harshchaudhary8182
    @harshchaudhary8182 3 ปีที่แล้ว

    best tutorial.

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      Thankyou beta!
      Keep learning and keep supporting Pepcoding😊

  • @saneetkaul8150
    @saneetkaul8150 2 ปีที่แล้ว

    Thank you

  • @honey.hemant_
    @honey.hemant_ ปีที่แล้ว

    Can i use while(minc

  • @sandipdeb5859
    @sandipdeb5859 2 ปีที่แล้ว

    Thank you so much sir ❤

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว +1

      Glad it helped!
      Keep learning.
      And for better experience and well organised content visit nados.pepcoding.com

  • @harshadashinde1796
    @harshadashinde1796 3 ปีที่แล้ว

    thanks for this sir..

  • @AnkitKumar-fj8ex
    @AnkitKumar-fj8ex 4 ปีที่แล้ว

    sir you are just awesome

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +2

      Thankyou beta!
      I am glad you liked it. I hope that you are watching till the end and trying to understand what, how, and especially why of the problem.
      If you like our efforts, will you like to write a few words about us here (www.quora.com/What-are-the-good-websites-to-learn-data-structures-and-algorithms )

    • @AnkitKumar-fj8ex
      @AnkitKumar-fj8ex 4 ปีที่แล้ว

      @@Pepcoding sure sir

  • @rishabhtripathi6465
    @rishabhtripathi6465 4 ปีที่แล้ว

    Very good explanation.

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      Glad you liked it

  • @pYthonroasT
    @pYthonroasT 2 ปีที่แล้ว

    thanks

  • @simardeepkaur8275
    @simardeepkaur8275 2 ปีที่แล้ว

    awesome

  • @ANUJGUPTA-pc7tf
    @ANUJGUPTA-pc7tf ปีที่แล้ว

    Sir what about the structure...?
    What if we want to maintain the structure of matrix after spiral...!

  • @sarthaknikhal5540
    @sarthaknikhal5540 3 ปีที่แล้ว

    SIr, what do you mean by, "dry run karke dekho."?

  • @vedantgolash6084
    @vedantgolash6084 4 ปีที่แล้ว

    very nice explanation sir

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว

      Thank you for supporting

  • @codebits2120
    @codebits2120 3 ปีที่แล้ว

    Will it work ?if we write in the condition of while loop like : while(int k

  • @kamalkumar7133
    @kamalkumar7133 2 ปีที่แล้ว

    smoooooooth 💕

  • @adityaverma8463
    @adityaverma8463 2 ปีที่แล้ว

    Sir Max column ko array[0]. length kyu liye ?

  • @crucialkali8983
    @crucialkali8983 4 ปีที่แล้ว

    nice video dear ,and can you make video playlist on data structure in java:)

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +1

      yahan hai playlist
      www.pepcoding.com/resources/online-java-foundation

  • @bikashbhowal9657
    @bikashbhowal9657 3 ปีที่แล้ว

    Great

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      keep motivating, keep learning and keep loving Pepcoding😊

  • @anshutomar304
    @anshutomar304 3 ปีที่แล้ว

    sir after running it an error occurs shows that there is an "not a statement" error in loops . what to do to fix it.

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว

      For better experience and precisely organised content visit - naods.pepcoding.com
      Also you can post such query on community tab.
      Don't forget to follow us on Instagram
      instagram.com/pepcoding/

  • @jeshar7720
    @jeshar7720 2 ปีที่แล้ว

    didn't even think of the box approach

  • @vinayjain7263
    @vinayjain7263 2 ปีที่แล้ว

    bhai bata raha hai ye chilla isse jyada pyar se to mera math ka teacher padata hai

  • @anckoor
    @anckoor 2 ปีที่แล้ว

    nice

    • @Pepcoding
      @Pepcoding  2 ปีที่แล้ว

      Keep learning.
      And for better experience and well organised content visit nados.pepcoding.com

  • @sahilmehra290
    @sahilmehra290 2 ปีที่แล้ว

    count

  • @pavanrameshghate5416
    @pavanrameshghate5416 3 ปีที่แล้ว

    Other youtubers: so we do with algorithm
    Bhaiya: hold my pen

  • @9893011111
    @9893011111 2 ปีที่แล้ว

    Are j ko toh declare kiya hi nahi... Build kaise hua??

  • @user-Abhi_7544pandey
    @user-Abhi_7544pandey ปีที่แล้ว

    sir n = 0 m = 0 put krne pe out of bound aa rha hai

  • @ANUJKUMAR-wc9dz
    @ANUJKUMAR-wc9dz 3 ปีที่แล้ว

    Time complexity going to be O(n) ?

    • @ANUJKUMAR-wc9dz
      @ANUJKUMAR-wc9dz 3 ปีที่แล้ว

      @Himanshu Kataria is it based row and columns if is it based on 1d time complexity should be O(n) ?

  • @shaikhadnan7265
    @shaikhadnan7265 3 ปีที่แล้ว

    niiiiice

    • @Pepcoding
      @Pepcoding  3 ปีที่แล้ว +1

      I am glad you liked it. I also hope that you are watching till end and trying to understand the what, how and especially why of the problem.
      If you like our efforts, we request a review
      g.page/Pepcoding/review?rc
      You can subscribe to our channel here
      th-cam.com/users/Pepcodingabout?view_as=subscriber

  • @ayushgoel9584
    @ayushgoel9584 4 ปีที่แล้ว

    bhaiya aaj hi poora 2d array upload kar do, aaj toh flow bna hua hai

    • @Pepcoding
      @Pepcoding  4 ปีที่แล้ว +5

      hanji. aj poora 2d ho jaega. 1d ke bache hue questions ki bhi koshish rahegi

  • @shri.d7399
    @shri.d7399 2 หลายเดือนก่อน

    Its not printimg 2 nd 3 the inner line