Merg sort problem

jab sir is vedio do sorted array ko merge kar raha tha
toh sir ne phele while loopme && kyu lagayaa waha pa toh
|| lagna chaiye tha naa. kyu ki hum ushme chech kar raha hai ki kon saa phele khatam hogaya array

@YASHMATHURIA123 if we dont use && and use || instead, we might be trying to access an out of bound index in the array that is smaller after we have looped through it completely. We need to stop as soon as even one of the arrays is done, and that’s why we need &&

mam magar && me toh dono condition true hoti hai naa toh woh kisi ek k true hona k baad woh dosra ko bhi true banna k liya woh out of bound chale jaaye gaa …

@YASHMATHURIA123 && condition will break the loop if any one of them is false.