摘要: 单链表逆转 单链表逆转算法草图如下: 方法1:借助辅助空间 建立临时的新链表,将新节点指向其前驱结点实现逆转: #include <stdio.h> #include <conio.h> #include<malloc.h> //#include "alloc.h" typedef struct / 阅读全文
posted @ 2017-02-27 11:40 瘋耔 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 1:简单除法 int i = 128; //待判断的整数 int count = 1; //待判断的整数是2的count次方while (i){if (2 == i){printf("YES: %d\n",count);break;}if (0 == i%2){i /= 2;count++;}els 阅读全文
posted @ 2017-02-27 11:23 瘋耔 阅读(795) 评论(0) 推荐(0) 编辑
跳至侧栏