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

preview_player
Показать описание
#competitiveprogramming
#dsa #ersahilkagyan #leetcode

Don't forget to hit the 🔔 for notifications !

Like | Subscribe | Share

Thanks for watching 😉
Рекомендации по теме
Комментарии
Автор

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

hrushikeshsuryawanshi
Автор

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

saurabhvanjari
Автор

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
correct me if i am wrong

shubhampal
Автор

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

himadripaul
Автор

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

gulmuazzamfaize
Автор

Output kuch or lete hai to correct input nhi milta

ecnikitavishwakarma