描述: Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. 分析: 如果第一个链表为空,则返回第二个链表如果第二个链表为空,就返回第一个链表(都为空会返回空
var array=[1,4,5,7,9,17];console.log(array); 比如要插入一个数16 var array=[1,4,5,7,9,17];var num=16;var index=null;var i;for(i=0;i<array.length;i++){if(array[i]<num){index=i;}}console.log(index);