class LNode{
public int data;
LNode next;
}
public class MyLinkList {
public static LNode head = null;
/**
@return
*/
public static LNode initList(int arr[]){
}
/**
打印链表中的所有元素
@param head
*/
public static void printItems(LNode head){
}
/**
求链表所有元素的和。
@param head
@return
*/
public static int getSum(LNode head){
}
/**
返回链表的长度。
@param head
@return
*/
public static int getLength(LNode head){
}
/**
删除链表中元素为偶数的结点。
@param head
@return
*/
public static boolean removeEvenNumber(LNode head){
return true;
}
/**
在链表中第i个结点(首元结点为第1个结点)后面插入元素elem
@param head
@param i
@param elem
@return
*/
public static boolean addElem(LNode head, int i, int elem){
return true;
}
/**
已知head1和head2所指向的链表均为按从⼩到⼤排序好的有序链表,将这两个
有序链表合并为⼀个新的有序链表,并返回指向头结点的指针。
@param head1
@param head2
@return
*/
public static LNode mergeList(LNode head1, LNode head2){
LNode mergedListHead = new LNode();
return mergedListHead;
}
public static void main(String args[]){
int arr[] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10};
}
}