class node
node(int data)
}class list
}public void insert(int data)
node.next = tmp.next;
tmp.next = node;
} public void delete(int data)
tmp = tmp.next;}}
public void reverse1()
head.next = pre;
}public void reverse2()
public void reverse3()
public void show()
system.out.println();}}
public class linklist
}
47 有頭結點的單鏈表
typedef int elemtype typedef struct node struct node next headlist 有頭結點的單鏈表 include headlist.h include include include static headlist elemtype val,he...
C 實現單鏈表 不含頭結點
vs2005執行通過,如有問題,請各位大牛指正。注意 單鏈表不含有頭結點 include using namespace std template 定義結點 struct node 定義鍊錶 templateclass linklist templatelinklist linklist 初始化時,...
c實現無頭結點單鏈表
標頭檔案 ifndef linklist h define linklist h include include include include typedef int datatype typedef struct node node,pnode,plist void initlinklist p...