Algorithm
文章平均质量分 81
godeyeswang
这个作者很懒,什么都没留下…
展开
-
链表排序
==========================功能:选择排序(由小到大)返回:指向链表表头的指针==========================*//*选择排序的基本思想就是反复从还未排好序的那些节点中,选出键值(就是用它排序的字段,我们取学号num为键值)最小的节点,依次重新组合成一个链表。我认为写链表这类程序,关键是理解:head存储的是第一个节点的地址,head->next转载 2010-04-10 13:41:00 · 487 阅读 · 0 评论 -
Dutch National Flag
<br />Dijkstra used the Dutch National Flag Problem* as a structured programming exercise in program derivation and program proof. Given `N' objects coloured red, white or blue, sort them so that objects of the same colour are adjacent, with the colours in转载 2010-11-03 06:02:00 · 634 阅读 · 0 评论