-
LINK
建立链表的算法:
新节点链入表尾建立链表:
动态分配第一个节点变量;
用指针head 妥善保存链表第一个节点的地址值;
依次动态分配一个新节点变量;
将上一个节点的指针域指向新生成的节点;
循环3),4)步骤,直到所有节点均连入链表;
将最后一个节点的指针域赋值为0;
(Establish the list of algorithms:
The new node links footer build list:
Dynamic allocation of the first node variable
Keep the list head pointer of the first node address value
In order to dynamically allocate a new node variable
The domain of a node pointer to the new generation of nodes
Cycle 3), 4) step, until all nodes are connected to the chain
Pointer field will last node assigned to 0 )
- 2015-01-05 16:03:48下载
- 积分:1
-
Airlinereservationsystem
用从语言实现飞机订票系统。程序中用到了数据结构中的队列和栈。(From the language used airline reservation system. Process the data structure used in the queue and stack.)
- 2011-06-04 23:19:23下载
- 积分:1
-
8sort_method
随机函数产生10000个随机数,用快速排序、直接插入排序、冒泡排序、选择排序的排序方法排序,并统计每一种排序所花费的排序时间和交换次数。其中随机数的个数由用户定义,系统产生随机数。(Random function generates 10,000 random numbers using quick sort, insertion sort, bubble sort, select Sort sort Sort, and statistics for each sort spend the sort of time and the number of exchanges. Wherein the number of the random number defined by the user, the system generates random numbers.)
- 2013-02-27 17:27:04下载
- 积分:1
-
Czhihen
关于C语言的一些指针的处理算法,能够使得初学者对C语言指针有自己的了解(Some pointers on C language processing algorithms, it is possible to make a beginner C language pointer has its own understanding)
- 2016-06-17 11:29:59下载
- 积分:1
-
luciferLanguage
这是acm里关于魔王语言的一道题,通过栈和队列的知识来解决。(this is balout luciferlanguage . i use the datastructure with stack and queue.)
- 2011-11-28 17:04:19下载
- 积分:1
-
maze
迷宫求解一般采用“穷举法”,逐一沿顺时针方向查找相邻块(一共四块-东(右)、南(下),西(左)、北(上))是否可通,即该相邻块既是通道块,且不在当前路径上。用一个栈来记录已走过的路径栈是限定仅在表尾(top)进行插入或删除操作的线性表。(Maze solving generally use the " exhaustive" one by one to find adjacent blocks in a clockwise direction (a total of four- East (right), South (down), West (left), North (on)) whether to pass, that the both channel blocks adjacent blocks, and not in the current path. Use a stack to record the path traversed stack is limited only in the tail (top) to insert or delete a linear form.)
- 2013-12-13 17:55:45下载
- 积分:1
-
sstring
利用串来比较数据大小,代码中有两个串,通过串来比较大小(
10/5000
Use the string to compare the data size)
- 2016-12-20 17:05:29下载
- 积分:1
-
paixu
简单选择排序,这是个解决排序问题的一个算法模型之一。(Sort simple choice, this is a solution to a scheduling problem, one algorithm model.)
- 2008-06-24 00:40:18下载
- 积分:1
-
qiuhe
多项式求和,用链表实现的一元多项式求和程序,比较 靠谱(Polynomial sum, with the linked list implementation of a polynomial summation procedure, more reliable)
- 2011-09-15 09:16:38下载
- 积分:1
-
arrangement
假设要在足够多的会场里安排一批活动,并希望使用尽可能少的会场。设计一个有效的贪心算法进行安排。(这个问题实际上是著名的图着色问题。若将每一个活动作为图的一个顶点,不相容活动间用边相连。使相邻顶点着有不同颜色的最小着色数,相应于要找的最小会场数。)
对于给定的k 个待安排的活动,编程计算使用最少会场的时间表。
(Suppose you want to arrange a number of activities in the hall more than enough, and want to use as little as possible venue. Design an effective greedy algorithm arrangements. (This problem is actually well-known graph coloring problem. If each activity as a vertex map, with the side connected between incompatible activities. Makes coloring adjacent vertices with minimum number of different colors, corresponding to looking The minimum number of venue.)
K to be arranged for a given activity, calculated using a minimum of venue programming schedule.)
- 2014-10-22 11:00:45下载
- 积分:1