Spiral Traversal of a Matrix | Spiral Matrix

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 318

  • @shubhamagarwal1434
    @shubhamagarwal1434 3 месяца назад +23

    #Free Education For All.. # Bhishma Pitamah of DSA...You could have earned in lacs by putting it as paid couses on udamey or any other elaerning portals, but you decided to make it free...it requires a greate sacrifice and a feeling of giving back to community, there might be very few peope in world who does this...."विद्या का दान ही सर्वोत्तम दान होता है" Hats Off to you man, Salute from 10+ yrs exp guy from BLR, India.....

  • @navkaransingh3948
    @navkaransingh3948 Год назад +178

    Hi striver, i think you already know but these series will be legacy for future coding students
    So, i hope you don't rush this series
    I'm saying this because i am seeing a lot of comments saying to complete it very fast.

    • @takeUforward
      @takeUforward  Год назад +168

      Yes I will be going at my pace, don't want to compromise on quality.

    • @shivamprajapati8662
      @shivamprajapati8662 Год назад +3

      thank you @@takeUforward

    • @gokulanvs
      @gokulanvs Год назад +2

      ​@@takeUforwardthank you so much bro❤

    • @Manoj_study
      @Manoj_study 3 месяца назад +7

      True that in 2024 still can't find a better DSA course than this 🫡

  • @AbhinayKrishna4
    @AbhinayKrishna4 10 месяцев назад +12

    Man you literally are a lifesaver, providing such a one stop destination for all the coding questions required to crack any interview.Thanks, striver for your dedication and hard work towards providing quality content.

  • @juliechoudhary9582
    @juliechoudhary9582 Год назад +20

    This course is really worth more than any course but still it is free.Thank you so much.

  • @yashkhatri3636
    @yashkhatri3636 Год назад +26

    you are providing such an amazing content at free of cost really india needs man like you !🤠

  • @habeeblaimusa4466
    @habeeblaimusa4466 Год назад +30

    Understood.
    The height of this series is you knowing how the code will be after the dry run..
    Thank you Striver

  • @ruchirtd1
    @ruchirtd1 Год назад +8

    Finally was able to solve this problem with 100% understanding! Thanks a lot.

  • @shreeyarao8265
    @shreeyarao8265 11 месяцев назад +5

    So well explained! Understood every bit of it!

  • @enzaki7603
    @enzaki7603 4 месяца назад +4

    Thank You Striver Bhaiya !
    Your playlist is really helping me a lot :)

  • @vaibhavchaudhary4966
    @vaibhavchaudhary4966 Месяц назад +1

    What a super clean implementation dude! hats off!

  • @yashgarg1961
    @yashgarg1961 Год назад +4

    Saw several videos on this question. This was the perfect and the easiest one. Hats off to you bhaiya. Thanks for such quality content :)

  • @KesavaReddyKuppireddygari
    @KesavaReddyKuppireddygari Год назад +47

    watch in 1.25 is a myth

    • @iAnuragJha
      @iAnuragJha 5 месяцев назад

      true that

    • @Try_me_
      @Try_me_ 3 месяца назад +3

      wdym? im watching all his videos in 1.5x

    • @animeshdubey941
      @animeshdubey941 23 дня назад

      @@Try_me_yes and you also you don’t understand 😂

  • @rishabh1S
    @rishabh1S Год назад +3

    Very good explaination!! Thanks Striver.

  • @mukeshKumar-go5cz
    @mukeshKumar-go5cz Год назад +3

    thank you for providing best content for us.
    we really love it.

  • @suraj_patwa
    @suraj_patwa Год назад +2

    Really this is a better to paid course
    Thank you striver bhiya

  • @pawanshimpi_dev
    @pawanshimpi_dev Месяц назад +1

    @takeUforward The solution can be simplified by removing the if conditions on internal for loops and writing the exit condition of the while loop as
    while(ans.length < m * n)
    This way the loop will never run if all the cells have been visited

  • @bhagyashreekhairnar683
    @bhagyashreekhairnar683 10 месяцев назад +1

    great explanation as always!! really clear!! Please continue making these videos.

  • @who__are___you____26__
    @who__are___you____26__ 7 месяцев назад +1

    Thank you very much for this course learnt a lot and your dedication is on another level you were recording this video on 3 am thanks a lot 🙌🙌

  • @cinime
    @cinime Год назад +4

    Understood! Wonderful explanation as always, thank you very very much for your effort!!

  • @atharva_g_vlogs
    @atharva_g_vlogs 3 месяца назад +10

    UNDERSTOOD!!!!
    HAPPY FRIENDSHIP DAY STRIVER

  • @ashokuta
    @ashokuta Месяц назад +1

    Nuvvu thopu guru, awesome

  • @tonylee1868
    @tonylee1868 Год назад +11

    great content...
    i know it will be very difficult for you but we need more videos as soon as possible

    • @JK-de2gh
      @JK-de2gh 3 месяца назад +1

      we don't need like this...we need quality...take your own time striver...

  • @shadowslayer2248
    @shadowslayer2248 6 месяцев назад +1

    Understood. Thank you for striving for us and surely we'll also strive to make your channel and the A2Z course be rated as the best in the world.

  • @amankumarverma8426
    @amankumarverma8426 4 месяца назад +2

    amazing approach!

  • @indroneelgoswami5654
    @indroneelgoswami5654 3 месяца назад +3

    Unbelievable Explanation!!

  • @bigjofa
    @bigjofa 11 дней назад

    Great video and explanation, you're awesome man, thank you!

  • @Manishgupta200
    @Manishgupta200 Год назад +2

    Understood ❤ I do it by two different technique. Approach is same but condition is different

  • @a_maxed_out_handle_of_30_chars
    @a_maxed_out_handle_of_30_chars Год назад +3

    this was good, thank you bhrata :)

  • @raynwani137
    @raynwani137 10 месяцев назад

    Bhai U are an Inspiration kasam se Career wise!

  • @AniketKumar-hf2bo
    @AniketKumar-hf2bo 10 месяцев назад +1

    understood ,thnx for excellent explanation ❤❤❤❤❤❤

  • @akashverma5756
    @akashverma5756 Год назад +5

    Simulation approach is more intuitive and clean if you uderstand direction co-ordinate. Direction co-ordinate help you solve many other matrix problems easily.

  • @milindjarsaniya
    @milindjarsaniya Год назад +1

    UNDERSTOOD as always!

  • @lucario404
    @lucario404 Год назад +3

    edge cases are mat[m][1] and mat[1][n], because of which 2 checks are needed

  • @Ri-hg6hs
    @Ri-hg6hs Год назад

    providing these well structured series by you feeling like that giving water to tree thnx by core of heart.

  • @hrushi_borhade
    @hrushi_borhade Год назад +2

    Thank you striver for great content!!

  • @ImRich-xo8cm
    @ImRich-xo8cm 2 месяца назад

    Whenever I see you I got inspired ❤

  • @indroneelgoswami5654
    @indroneelgoswami5654 3 месяца назад +1

    unbelievable explanation!!

  • @neoh1471
    @neoh1471 Год назад +4

    your solution is good, but i have another idea, i'm using javascript shift(), pop() and reverse() to get the array element into my answer array, then every time i process a row, i'll transpose the matrix and i will reverse() it if needed, then repeat untill the matrix become empty, and print the answer array. All code is written in a while loop with lambda functions.
    let ans = []
    while(matrix.length != 0){
    matrix.shift().forEach(x => ans.push(x));
    if(matrix.length == 0) break;
    matrix = matrix[0].map((_,colIndex) => matrix.map(row => row[colIndex]));
    matrix.pop().forEach(x => ans.push(x));
    if(matrix.length == 0) break;
    matrix = matrix[0].map((_,colIndex) => matrix.map(row => row[colIndex]));
    matrix.pop().reverse().forEach(x => ans.push(x));
    if(matrix.length == 0) break;
    matrix = matrix[0].map((_,colIndex) => matrix.map(row => row[colIndex]));
    matrix.shift().reverse().forEach(x => ans.push(x));
    if(matrix.length == 0) break;
    matrix = matrix[0].map((_,colIndex) => matrix.map(row => row[colIndex]));
    }
    // print ans here

  • @MMirabel
    @MMirabel Год назад

    Understood..Very clean explanation!

  • @NazeerBashaShaik
    @NazeerBashaShaik 11 месяцев назад

    Great explanation as usual. Thank you.

  • @infernogamer52
    @infernogamer52 Год назад +1

    Understood Bhaiya!

  • @hareshnayak7302
    @hareshnayak7302 8 месяцев назад

    Understood,Thanks striver for this amazing video.

  • @dinimeegada9167
    @dinimeegada9167 Год назад

    Understood
    I have been waiting for this video from Striver anna
    ❤️ U Anna

  • @AmareshwarBhat800
    @AmareshwarBhat800 7 месяцев назад

    Hi @takeUforward I did not get the last contraint from your explaination as you are too fast at the end. But I got it. Thanks for the video.

  • @diyaghosh3721
    @diyaghosh3721 4 месяца назад

    understood! amazing explanation!!

  • @leetcoder6569
    @leetcoder6569 Год назад +7

    Why there's so much rush in CB, RAJ BHAIYA is a human being too, we have sheet na, we canbdo it on our own pace..

  • @sarangkumarsingh7901
    @sarangkumarsingh7901 8 месяцев назад

    Another Awesome Lecture Sir............

  • @ishangujarathi10
    @ishangujarathi10 Год назад +1

    lovedd the intuition

  • @VineetKumar-fk2rl
    @VineetKumar-fk2rl Год назад

    Understood amazing explanation as always❤❤

  • @NitinKumar-wm2dg
    @NitinKumar-wm2dg Год назад +1

    Thank you bhaiya, understood

  • @priyachauhan813
    @priyachauhan813 Год назад

    Understood at one go Thank You Striver

  • @ru_mum77
    @ru_mum77 5 месяцев назад

    Sir Thanks a lot for the excellent explanation 😁

  • @shristipurusarthi6675
    @shristipurusarthi6675 Год назад

    thank you soo much brother for the wonderful explanation

  • @sayakghosh5104
    @sayakghosh5104 Год назад

    Understood! Awesome explanation.

  • @kingbadshah452
    @kingbadshah452 10 месяцев назад

    thanks striver understood everything

  • @kanikagyamlani
    @kanikagyamlani 7 месяцев назад

    This is one of the hardest questions I have come across in a while

    • @ce038_divanshsingh3
      @ce038_divanshsingh3 7 месяцев назад

      And u r also looking hard.😊

    • @Yup728
      @Yup728 6 месяцев назад

      @@ce038_divanshsingh3 chill bro wth u saying

  • @konankikeerthi
    @konankikeerthi 5 месяцев назад

    Thank you bro. understood clearly.

  • @studentOfCoding
    @studentOfCoding 2 месяца назад

    great explanation!

  • @harshilpatel3205
    @harshilpatel3205 4 месяца назад +1

    Understood 🙏🏻

  • @tarushidubey2973
    @tarushidubey2973 Год назад

    you are amazing sir huge respect ...

  • @abhishek__anand__
    @abhishek__anand__ Год назад

    Great Explanation

  • @moharramansari2594
    @moharramansari2594 Год назад +1

    The way you explain

  • @priyankavasam8769
    @priyankavasam8769 Год назад

    wonderful explanation

  • @khalasianiket816
    @khalasianiket816 4 месяца назад +1

    understood❤

  • @hariomatkar4689
    @hariomatkar4689 Год назад

    Itne aasan se bataya ki aadha dekhke hi pura pta chal gya

  • @anshusharma0052
    @anshusharma0052 2 месяца назад

    its amazing 🤩😻

  • @chinnadhodlekavitha6540
    @chinnadhodlekavitha6540 4 месяца назад +1

    Please add videos related to strings as soon as possible.

  • @torishi82
    @torishi82 4 месяца назад

    Samaj aa gaya!!

  • @ProgrammingKT
    @ProgrammingKT 10 месяцев назад

    Nice explanation!

  • @p4avinash
    @p4avinash Год назад

    Understood, Great explanation.

  • @AjeyaKumaraK
    @AjeyaKumaraK 6 месяцев назад +1

    understanding

  • @GhostVaibhav
    @GhostVaibhav Год назад +1

    Understood🔥

  • @computerscience68
    @computerscience68 Год назад

    Thank You Bhaiya 😊

  • @adityalawande1771
    @adityalawande1771 Месяц назад

    Thank you thats all I can say!!!!

  • @quickknowledge1401
    @quickknowledge1401 Год назад

    Best approach

  • @gautamsaxena4647
    @gautamsaxena4647 2 месяца назад

    understood bhaiya

  • @juhichoudhary9281
    @juhichoudhary9281 Год назад

    Understood ❤‍🔥❤‍🔥

  • @samuelfrank1369
    @samuelfrank1369 9 месяцев назад

    Understood. Thanks a lot

  • @rohandhalpe9084
    @rohandhalpe9084 Год назад +5

    Sir please , upload videos as fast as possible. 📤📤📤🕔🕔🕔
    No more time remaining for our placement

    • @notcliche4864
      @notcliche4864 Год назад +6

      Are bro, wo bhi toh insan ha ek saath kitna kaam krega

    • @alokkumarmishra5172
      @alokkumarmishra5172 Год назад

      bhai sath me dp series ya graph ya tree series padh sakta hai it also help for your upcoming placements

    • @aman_singh__
      @aman_singh__ Год назад

      bro tum wait karoge to nhi hoga khud se karne ka try karo. ek banda akele kitna hi kar lega

    • @rohandhalpe9084
      @rohandhalpe9084 Год назад

      @@aman_singh__ 🙌

  • @SYCOA12CHAITANYAASOLE
    @SYCOA12CHAITANYAASOLE 6 месяцев назад

    Understood !! 😍😍

  • @VarunGodiya
    @VarunGodiya Год назад +23

    please complete it as soon as possible .

    • @inspiringzone12
      @inspiringzone12 Год назад +8

      Quality is rare with speed

    • @NithinvKumar-uk2he
      @NithinvKumar-uk2he Год назад +2

      Yes please do complete fast it will be so much helpful for our upcoming placements please

  • @charan123rams3
    @charan123rams3 Год назад

    thankyou sir love you so much 🥰

  • @oyeesharme
    @oyeesharme 2 месяца назад

    thanks bhaiya

  • @Sachin-x4m7c
    @Sachin-x4m7c 8 месяцев назад

    I was able to solve this by myself but used one pointer only, this is very easy than my code lmao

  • @sri-z5d
    @sri-z5d Месяц назад

    understood bhaiii

  • @karanveersinghdeora5085
    @karanveersinghdeora5085 Год назад +1

    understood

  • @Learnprogramming-q7f
    @Learnprogramming-q7f 9 месяцев назад

    Thank you Bhaiya

  • @YourCodeVerse
    @YourCodeVerse Год назад

    Understood✅🔥🔥

  • @TanyaTa-ex6mk
    @TanyaTa-ex6mk Год назад

    Thankyou dada🙏🏻🙏🏻🧡

  • @student_03
    @student_03 Год назад

    understood sir thanks a lot

  • @palkasandeep2313
    @palkasandeep2313 Год назад

    Growing day by day in dsa

  • @reddygopichand2002
    @reddygopichand2002 Год назад

    Understood thanks 👍🙏

  • @falaknaaz789
    @falaknaaz789 Год назад +1

    Thank you sir❤

  • @lakshsinghania
    @lakshsinghania 7 месяцев назад

    I saw at the bottom "last saved on" 3:57 AM 3:58 AM 4:00 AM" orz striver bhaiya, staying awake and recording the lecture at late night

  • @Sigmagaming175
    @Sigmagaming175 Год назад

    Understood ✨

  • @lakshmiprasanna7058
    @lakshmiprasanna7058 Год назад

    Understood 💯💯💯

  • @shubhammeena2316
    @shubhammeena2316 Год назад

    thank you so much bhaiya

  • @aayushparsu3303
    @aayushparsu3303 Год назад

    Understood 👍🏻👍🏻👍🏻

  • @Sumeet_100
    @Sumeet_100 Год назад

    just amazing !!

  • @kumpatisupriya3947
    @kumpatisupriya3947 8 месяцев назад

    Awesome 🤩🤩