摘要: #include#includeusing namespace std;/*** 找到链表中的倒数第k个节点*///定义结构体typedef struct Node{ int val; Node* next;} Node;//创建链表Node* createNode(){ int ... 阅读全文
posted @ 2014-10-30 10:17 NW_KNIFE 阅读(485) 评论(0) 推荐(0) 编辑
摘要: #include#includeusing namespace std;//定义结构体typedef struct Node{ int val; Node* next;} Node;void swap(Node* a,Node* b){ int tmp = a->val; a... 阅读全文
posted @ 2014-10-30 09:52 NW_KNIFE 阅读(7202) 评论(0) 推荐(0) 编辑
摘要: public class BiSearchChangeMode1{ public static void main(String args[]){ double[] a = {1,2.5,2.5,2.5,2.5,2.5,3,4,4,4,5}; int len = a... 阅读全文
posted @ 2014-10-30 09:03 NW_KNIFE 阅读(230) 评论(0) 推荐(0) 编辑