Merge Sorted Array | Leetcode 88

แชร์
ฝัง
  • เผยแพร่เมื่อ 6 ก.ย. 2024
  • Merge Sorted Array
    Leetcode problem number 88
    JAVA interview programming playlist:
    • Interview Programming ...
    Git Repo:

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

  • @pragmaticcoder6910
    @pragmaticcoder6910 6 หลายเดือนก่อน +13

    Your explanations are much better than LeetCode Editorial solutions. Thanks !

    • @name-sn6
      @name-sn6 หลายเดือนก่อน

      bro im new to this and i didnt understand anything , how to begin learning

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

    Thank you very much! I finally understood how to solve this problem without creating new array

  • @thAsciNileshPal
    @thAsciNileshPal หลายเดือนก่อน +3

    keep it up didiiiii ; U and SashCode channel doing great job ; i request u too pls come up with the series of daily leetcode potd solutionss

  • @diproy9363
    @diproy9363 ปีที่แล้ว +8

    To the point and simple! awesome explanation.

  • @shivraj940
    @shivraj940 8 หลายเดือนก่อน +3

    Mam, only 6 problems there in Top 150 interview category. Please complete this section

  • @beesettiswathi7162
    @beesettiswathi7162 2 หลายเดือนก่อน +1

    great explanation mam..thank you so much

  • @sauryakumargupta3008
    @sauryakumargupta3008 2 หลายเดือนก่อน

    Outstanding explanation in such a ez way

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

    Ma'am please solve other interview questions...your explanations are very good.Thankyou🤗

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

      Hi..Will continue leetcode questions series very soon..Please stay tuned..
      Thanks!

  • @nammi-dahiya
    @nammi-dahiya ปีที่แล้ว

    Thanks mam apke solution se maine DSA ke bhut ache ache concepts sikha paya

  • @bhargavchandhu5100
    @bhargavchandhu5100 หลายเดือนก่อน +1

    it is best and simple than above
    class Solution {
    public void merge(int[] nums1, int m, int[] nums2, int n) {
    for (int j = 0, i = m; j < n; j++) {
    nums1[i] = nums2[j];
    i++;
    }
    Arrays.sort(nums1);
    }
    }

  • @user-bi8qz3mr6t
    @user-bi8qz3mr6t 9 หลายเดือนก่อน +2

    mam ek doubt h
    ki apne loop start karte time j>=0 ki place pr i>=0 kyu nhi likha ???

    • @courtneyadjoa246
      @courtneyadjoa246 7 หลายเดือนก่อน

      kyunki humko second array se hi compare karna hai na.... aur resultant changes i variable ko represent karte hai .
      aur humne final result bhi wahin store karna hai.

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

    found this channel today keep making videos like this best of luck friend

  • @athravnigadikar4925
    @athravnigadikar4925 7 หลายเดือนก่อน +1

    Plz mam can u teach how to implement hashmap and other collection things in problems detail video so many students gets confusing in that

  • @SayanBanikAuthor
    @SayanBanikAuthor 3 หลายเดือนก่อน

    Very Nice Video! Thanks Ma'am

  • @AshishKumar-od3pr
    @AshishKumar-od3pr 5 หลายเดือนก่อน

    Why are we using 0,0,0 in the end of nums1, since arrays are mutable?

    • @syedrizwan2203
      @syedrizwan2203 5 หลายเดือนก่อน +1

      arrays are fixed in nature if you don't initialised it with 0s what you will put there other than zero to make it size of m i.e 6 here
      2nd thing if you use scanner class also arrays will get initialised with zeros only for int values.

    • @AshishKumar-od3pr
      @AshishKumar-od3pr 5 หลายเดือนก่อน

      @@syedrizwan2203 thanks bro

  • @melk48111
    @melk48111 10 หลายเดือนก่อน

    Your videos are great. Thank you

  • @technologiesmotivationd7754
    @technologiesmotivationd7754 7 หลายเดือนก่อน

    Hi mam
    your explanation is very easy so please can you make leet code video in java please mam

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

    dear sister, I am unable to catch the coding logic without seeing the code in video or other tutorial but i understand what to do but cant implement the code .this giving me much stress, I am a beginner .I have solved 9 easy problem but in every problem i have to take help..what should i do?where should i focus on.can I be a good programmer?

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

      just keep grinding.

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

      Keep practicing easy lvl problems and build that confidence!

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

      @@humanityrush thanks for your advice.

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

    thank you, mam.

  • @chaithanyack
    @chaithanyack 5 หลายเดือนก่อน

    how we are taking i=m-1; i dont understand that particular part

    • @mohsinbehzad8993
      @mohsinbehzad8993 5 หลายเดือนก่อน +1

      in above example, m is equal to 3, means 3rd position. But the index in Array starts from 0 and position starts from 1. So (i =m-1) means that In above example, when the position is 3 then the index will be 2. That is the reason that we subtract 1 from the position of Array to get the index. Hope u understand...

    • @gustavodeoliveira8316
      @gustavodeoliveira8316 2 วันที่ผ่านมา

      @@mohsinbehzad8993 good explanation.

  • @user-uo7by6hh1h
    @user-uo7by6hh1h ปีที่แล้ว +2

    god level explanation

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

    Mam please upload the video on Leetcode problem no- 238. Product of Array Except Self

  • @BlendBox
    @BlendBox 5 หลายเดือนก่อน

    Thank you so much 🙏

  • @bhargavasai5557
    @bhargavasai5557 6 หลายเดือนก่อน

    Thank you ma'am

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

    Didi you don't explain why we have to place i, j or k pointers at that position only 😢 . Why can't we start our pointers from somewhere else . You should explain also as it will help with thought process

    • @bibhutibaibhavbora8770
      @bibhutibaibhavbora8770 2 หลายเดือนก่อน

      Because we are starting from some specific point that is num1 and nums2 places because these arrays are sorted already. We can't randomly put pointers

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

    Thank you!

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

    Awesome thanks

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

    Thankyou ❤

  • @krushnachandrajena6297
    @krushnachandrajena6297 8 หลายเดือนก่อน

    can you share your git repo.

  • @movieshots2135
    @movieshots2135 4 หลายเดือนก่อน +1

    there is solution better than this just add nums2[] elements in the nums1[] array and sort them

  • @padmavatishah9922
    @padmavatishah9922 10 หลายเดือนก่อน

    great expplanation.

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

    This code is fail when m=0

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

      Hi..
      The code will not fail..As mentioned in the problem, m=0 means there are no elements in the nums 1 arrays so the output would be all elements of nums2 array..
      Please try the code..I have tried and submItted ,it's working fine

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

      Yes its failing check again didi

    • @Rob-J-BJJ
      @Rob-J-BJJ 11 หลายเดือนก่อน

      it works for me

  • @Rob-J-BJJ
    @Rob-J-BJJ 11 หลายเดือนก่อน

    thank you it worked fine

  • @SayanBanikAuthor
    @SayanBanikAuthor 3 หลายเดือนก่อน

    7:05

  • @irfanahmad9761
    @irfanahmad9761 10 หลายเดือนก่อน

    Hi, pls continue this series. #addicted

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

    Cute kitni hai ye ❤

  • @disrespect12
    @disrespect12 6 หลายเดือนก่อน

    class Solution {
    public void merge(int[] nums1, int m, int[] nums2, int n) {
    int count=0;
    for(int i=m;i