2021年8月13日
JavaScript 将俩个有序数组合并为一个有序数组(每日一题)
function arrSort(arr1, arr2) {
var [i,j] = [0,0];
let newArr = [];
while(i < arr1.length || j <arr2.length) {
if (arr1[i] < arr2[j]) {
newArr.push(arr1[i]);
i++
} else if (arr1[i] > arr2[j]) {
newArr.push(arr2[j])
j++
} else {
if(arr1[i]) newArr.push(arr1[i]);
if(arr2[j]) newArr.push(arr2[j]);
i++;
j++
}
}
return newArr
}
let arrs = arrSort([2,4,6,7], [1,2,3,5,8,9,10,33,44,49]);
console.log(arrs);
打印出:[1, 2, 2, 3, 4, 5, 6, 7, 8, 9, 10, 33, 44, 49]
Based on the results, it can be confirmed that NLC Eu, NLC Blank and eucalyptol were not toxic for consumption as there were no abnormalities and no significant changes in the serum biochemical analysis parameters and creatinine level in the serum biochemical analysis priligy amazon
priligy dapoxetina 30mg nos eua We now emphasize the fact that the FDA recently issued a warning to the makers of the LipoTron device that it is considered by the agency to be both adulterated and misbranded