摘要: 1: /* 2: *Author:justinzhang 3: *Email:uestczhangchao@gmail.com 4: *Time:2011年5月11日16:17:52 5: *Discription:冒泡排序算法, change to cpp and add template @2012-9-4 22:08:26 6: */ 7: ... 阅读全文
posted @ 2012-04-15 20:51 justinzhang 阅读(270) 评论(0) 推荐(0) 编辑
摘要: /**author:zhangchao*time:2011年3月31日17:24:11*from:c语言竞赛题目大全第三题*/#include <stdio.h>#include <stdlib.h>/* * 有 N 个小孩围成一圈,给他们从1 开始依次编号,现指定从第 W个开始报数,报到第S 个时,该小 *孩出列,然后从下一个小孩开始报数,仍是报到 S 个出列,如此重复下去,直到所有的小孩都出列... 阅读全文
posted @ 2012-04-15 20:48 justinzhang 阅读(466) 评论(0) 推荐(0) 编辑
摘要: /************************************************************************//* *Author:justinzhang/*Email:uestczhangchao@gmail.com/*Establish:2011年5月14日16:43:46/*Discription:算法导论22章并查集&&poj1611 ... 阅读全文
posted @ 2012-04-15 20:43 justinzhang 阅读(933) 评论(0) 推荐(0) 编辑
摘要: /**Author:justinzhang*Email:uestczhangchao@gmail.com*Discription:实现算法导论第六章的堆排序算法*Time:2011年5月11日15:39:30*/#include <stdio.h>void swap(int *x,int *y){ int tmp = *x; *x = *y; *y = tmp;}//建立以i为根... 阅读全文
posted @ 2012-04-15 20:41 justinzhang 阅读(519) 评论(0) 推荐(0) 编辑
摘要: 1: /* 2: *Author:justinzhang 3: *Email:uestczhangchao@gmail.com 4: *Time:2011年5月11日15:58:40 5: *Discription:算法导论第7章,快速排序算法实现 6: change the previous c to cpp, and using ... 阅读全文
posted @ 2012-04-15 20:37 justinzhang 阅读(623) 评论(0) 推荐(0) 编辑
摘要: /**about: 腾讯面试,将一个单向链表逆序*author:justinzhang*email:uestczhangchao@gmail.com*estblished:2011年4月24日16:40:25*revised:2011年5月10日15:00:26*/#include <iostream>using namespace std;class node{ public: ... 阅读全文
posted @ 2012-04-15 20:36 justinzhang 阅读(13348) 评论(0) 推荐(3) 编辑
摘要: 1: /* 2: *discription:给定一组数,将零全部排到最后,将非零元素排在最前,华为面试 3: *autor:justinzhang 4: *Email:uestczhangchao@gmail.com 5: *Established:2011年2月8日21:13:47 6: *Revised1:2011年4... 阅读全文
posted @ 2012-04-15 20:34 justinzhang 阅读(2078) 评论(0) 推荐(1) 编辑