数据结构
文章平均质量分 54
Marionette
不断为了成为架构师而奋斗的年轻人
展开
-
数据结构之------快速排序
快速排序(Quicksort)是对冒泡排序的一种改进。由C. A. R. Hoare在1962年提出。它的基本思想是:通过一趟排序将要排序的数据分割成独立的两部分,其中一部分的所有数据都比另外一部分的所有数据都要小,然后再按此方法对这两部分数据分别进行快速排序,整个排序过程可以递归进行,以此达到整个数据变成有序序列。 public class QuickSort { public st原创 2011-12-27 22:06:50 · 370 阅读 · 0 评论 -
数据结构之-------优化的冒泡排序
JAVA实现//jdk1.5以上版本 package sort; public class BubbleSort { public static void bubbleSort(int... a) { boolean flag = true; for (int i = 0; i < a.length - 1 && flag; i++) { flag = false;原创 2011-12-27 20:14:02 · 370 阅读 · 0 评论 -
c语言 linked list
MyLinkList.h #include #include #define NEW (struct node *)malloc(sizeof(struct node)) struct node { char name[20]; char tel[9]; struct node *next; }; /* 创建 linked list */ stru原创 2012-05-05 19:41:28 · 4194 阅读 · 0 评论