2011年5月13日

删除单链表中偶数节点

摘要: 题目意思就是:删除链表中第2个节点,第4个节点......,即删除所有第偶数个节点#include <stdio.h>#include <stdlib.h>#define LEN 8typedef struct node node_t;struct node{ int val; node_t *next; }; //delete even nodevoid delete_even_node(node_t* head);int main(){ node_t** arr = (node_t**)malloc(sizeof(node_t*)*LEN); arr[0] = (n 阅读全文

posted @ 2011-05-13 15:12 NULL00 阅读(5234) 评论(0) 推荐(0) 编辑

导航