Find the union and intersection of two sorted arrays |Q.6| Love Babbar DSA 450 Questions |Er Sahil

Поділитися
Вставка
  • Опубліковано 30 вер 2024
  • #competitiveprogramming
    #dsa #ersahilkagyan #leetcode
    Love Babbar DSA 450 Questions (Array): • Love Babbar DSA 450 Qu...
    Sheet:docs.google.co...
    Don't forget to hit the 🔔 for notifications !
    Instagram: / sahilfs_2000
    Channel: / ersahilkagyan
    Like | Subscribe | Share
    Thanks for watching 😉

КОМЕНТАРІ • 14

  • @saurabhvanjari2232
    @saurabhvanjari2232 4 місяці тому +2

    Agar ek array me same element ho to code not working for Union

  • @shubhampal2971
    @shubhampal2971 11 днів тому

    wrong code for union. if array 1 is exhausted . then you took all remaining elements from array 2 and print those. but what if the remaining elements of array2 are already present in union array (duplicates)? you have to check first whether or not they are present in union array or not. and then print only those which are non duplicates.....
    correct me if i am wrong

  • @himadripaul7332
    @himadripaul7332 2 роки тому +3

    video code ki ..improve it you can use notepad ...no problem in that
    otherwise what I found logic is good compare to others ..

    • @ErSahilkaGyan
      @ErSahilkaGyan  2 роки тому

      U will see improvement in upcoming videos

  • @hrushikeshsuryawanshi708
    @hrushikeshsuryawanshi708 4 місяці тому

    brother i was using two loop approach but your approach is simple and good.thankyou

  • @gulmuazzamfaize6020
    @gulmuazzamfaize6020 Рік тому +1

    Brother your code only work in increasingly sorted arrays.
    What about decreasingly sorted arrays?

    • @hrushikeshsuryawanshi708
      @hrushikeshsuryawanshi708 4 місяці тому

      it is not an issue just change the sign of comparison of first two biconditional statement

    • @hrushikeshsuryawanshi708
      @hrushikeshsuryawanshi708 4 місяці тому

      and take a function name for ascend sorted and descend sorted

  • @leenahjune
    @leenahjune Рік тому

    Nice job..but i have a question

  • @icoder4531
    @icoder4531 Рік тому

    Nice explain... Sir ❤️‍🩹

  • @ec072nikitavishwakarma7
    @ec072nikitavishwakarma7 Рік тому

    Output kuch or lete hai to correct input nhi milta

  • @Bouncy_FunZone
    @Bouncy_FunZone 2 роки тому

    Great 👍 explanation

  • @subasishmula
    @subasishmula 2 роки тому

    good video