![](/img/trans.png)
[英]My javascript loop/ while statement code doesn't work, please help me identify my problem
[英]merge sorted array problem leetcode problem please help me with this code I have mentioned my piece of code and image of my input vs required output
var 合並 = 函數(nums1,m,nums2,n){
讓第一個 = m-1;
for(let i = n-1; i>=0;i-- )
{
if(nums1[first]>nums2[i])
{
nums1.splice[first,0,nums2[i]]
}
else{
nums1.splice(first+1,0,nums2[i])
}
}
nums1.splice(m+n-1)
}; [在此處輸入圖片說明][1]
[1]: https : //i.stack.imgur.com/r2jAC.png**強文本**
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.