Description: 首先,用前插法建立链表,在算法中以create函数表示;其次,定义mergeab函数,表示算法的归并:
本算法的思路为:顺次逐个将单链表的ha中的节点(P节点)在链表 hb中查找是否有重复的结点,若有,则不插入到链表hb中,将其从链表ha中删除。若在链表hb中找到第一个大于P的节点的数据域值的节点(Q节点),则在Q节点之前插入P节点,否则将链表ha联接到链表hb的表尾。为了实现方便在单连表hb之前附加一个表头节点,带归并完成后,再归还该表头节点,返回归并后连表的头指针。
最后,定义main函数,引用之前定义函数完成程序。
-First, the voting method used chain, in the algorithm to create Functions; Secondly, mergeab function definition, the merging algorithm : the idea of this algorithm are : Solve each of the single linked list of nodes ha (P nodes) in the linked list hb whether the search duplicated nodes, if they are not inserted into the chain hb, from its chain ha deleted. If the chain hb find a resolution greater than the P-domain data nodes value of the node (Q nodes), Q node in P insert nodes, or they will Chain link to the chain ha hb end of the table. To achieve even the convenience of the single-table hb an additional table before the first node, with merger, after the completion of the return of the table first node, Even after the return of merging the head table pointer. Finally, the definition o Platform: |
Size: 1033 |
Author:皮皮 |
Hits:
Description: 首先,用前插法建立链表,在算法中以create函数表示;其次,定义mergeab函数,表示算法的归并:
本算法的思路为:顺次逐个将单链表的ha中的节点(P节点)在链表 hb中查找是否有重复的结点,若有,则不插入到链表hb中,将其从链表ha中删除。若在链表hb中找到第一个大于P的节点的数据域值的节点(Q节点),则在Q节点之前插入P节点,否则将链表ha联接到链表hb的表尾。为了实现方便在单连表hb之前附加一个表头节点,带归并完成后,再归还该表头节点,返回归并后连表的头指针。
最后,定义main函数,引用之前定义函数完成程序。
-First, the voting method used chain, in the algorithm to create Functions; Secondly, mergeab function definition, the merging algorithm : the idea of this algorithm are : Solve each of the single linked list of nodes ha (P nodes) in the linked list hb whether the search duplicated nodes, if they are not inserted into the chain hb, from its chain ha deleted. If the chain hb find a resolution greater than the P-domain data nodes value of the node (Q nodes), Q node in P insert nodes, or they will Chain link to the chain ha hb end of the table. To achieve even the convenience of the single-table hb an additional table before the first node, with merger, after the completion of the return of the table first node, Even after the return of merging the head table pointer. Finally, the definition o Platform: |
Size: 1024 |
Author:皮皮 |
Hits:
Description: 聚类算法:最短距离算法。对给定的数据集进行自底向上的层次的分解,直到某种条件满足而已。缺陷在于一旦一个步骤完成,它就不能被撤消这个严格的规定是有用的,由于不用担心组合数目的不同选择,计算代价会较小。-Clustering Algorithm: the shortest distance algorithm. For a given data set to the level of bottom-up decomposition, until certain conditions are fulfilled it. Once the defect is a step towards completion, it can not be undone this strict requirement is useful to not have to worry about as a result of combination of the number of different options for calculating the price will be smaller. Platform: |
Size: 4096 |
Author:刘嘉良 |
Hits:
Description: 设A与B分别为两个带有头结点的有序循环链表(所谓有序是指链接点按数据域值大小链接,本题不妨设按数据域值从小到大排列),list1和list2分别为指向两个链表的头指针。请写出将这两个链表合并为一个带头结点的有序循环链表的算法-Set A and B respectively with the first two nodes in an orderly cycle of chain (the so-called orderly means click the link data field value of the size of the link, the title may be established by the data field values from small to large order), list1 and List2 respectively, point to the two pointer list head. Please write the two merged into a single list to take the lead in node list in an orderly cycle of the algorithm Platform: |
Size: 153600 |
Author:苏若水 |
Hits:
Description: 设A与B分别为两个带有头结点的有序循环链表(所谓有序是指链接点按数据域值大小链接,本题不妨设按数据域值从小到大排列),list1和list2分别为指向两个链表的头指针。请写出将这两个链表合并为一个带头结点的有序循环链表的算法-Set A and B respectively with the first two nodes in an orderly cycle of chain (the so-called orderly means click the link data field value of the size of the link, the title may be established by the data field values from small to large order), list1 and List2 respectively, point to the two pointer list head. Please write the two merged into a single list to take the lead in node list in an orderly cycle of the algorithm Platform: |
Size: 15360 |
Author:123 |
Hits:
Description: 设A与B分别为两个带有头结点的有序循环链表(所谓有序是指链接点按数据域值大小链接,本题不妨设按数据域值从小到大排列),list1和list2分别为指向两个链表的指针。请写出将这两个链表合并为一个带头结点的有序循环链表的算法-Set up A and B respectively with the first two nodes in an orderly circulation list (so-called orderly means the link click data link threshold size, the title may be set up by the data field values from small to large order), list1 and List2 list were two of the indicators point. Please write a list of these two merged into a single node to take the lead in the orderly cycle of the algorithm list Platform: |
Size: 1024 |
Author:苏若水 |
Hits:
Description: Dijktra s single source shortest path algorithm. The function takes a graph (which may be sparse) as an input and returns the matrix of shortest distances between all of the nodes. Additionally, individual source and sink nodes may be specified as additional arguments. Platform: |
Size: 1024 |
Author:ruso |
Hits:
Description: A token ring network consists of a set of nodes connected in a ring. The ring is a single
shared medium. The token ring technology involves a distributed algorithm that controls
when each node is allowed to transmit. All nodes see all frames, and the node identified
as the destination in the frame header saves a copy of the frame as it flows past. With a
ring topology, any link or node failure would render the whole network useless. Platform: |
Size: 524288 |
Author:vagazone |
Hits:
Description: 设有n个待排序元素存放在单链表中,每个链表结点只存放一个元素,头指针为r,试设计算法对其进行二路归并排序,要求不移动结点中的元素,只修改各链结点中的指针,排序后r仍指向结果链表的第一个结点。-With n-elements to be stored in a single list sorted, each linked list node store only one element, the first pointer to r, test their design algorithm for merge sort, asked not to move the node elements, only the changes The link points to a pointer, r is still pointing to the results sorted list the first node. Platform: |
Size: 1024 |
Author:林小芬 |
Hits:
Description: 1 掌握不同的聚类方法—基于层次与基于划分的方法
2 学会层次聚类的单连接算法
3 学会K-means算法
-A master of different clustering methods- based on hierarchical partitioning method based on hierarchical clustering 2 Society 3 Society of single-link algorithm K-means algorithm Platform: |
Size: 68608 |
Author:李岩 |
Hits:
Description: This program simulates a single-channel fiber transmission link
using the symmetrized split-step Fourier algorithm.
- This program simulates a single-channel fiber transmission link
using the symmetrized split-step Fourier algorithm.
Platform: |
Size: 2048 |
Author:siamak |
Hits:
Description: (1)输入字符序列,建立二叉链表。
(2)遍历二叉树输出。
(3)请设计一个算法,要求该算法把二叉树的叶子结点按从左到右的顺序连成一个单链表,表头指针为head。 二叉树按二叉链表方式存储,链接时用叶子结点的右指针域来存放单链表指针。请遍历该链表输出所有叶子结点,然后再先序遍历二叉树输出所有叶子结点,并对比两个输出结果,看是否相同。
(4)试写一算法判断某二叉树是否是完全二叉树。
(5)试写一算法判断某二叉树是否是二叉排序树。
(6)在主函数中设计一个简单的菜单,分别调试上述算法。
-(1) the input character sequence, the establishment of binary list.
(2) traverse the binary output.
(3) Please design an algorithm, requiring the algorithm to the binary tree leaf nodes from left to right together into a single linked list, the first table pointer to head. Binary tree by binary list stored, the link with the leaf nodes of the right to store a single pointer field list pointers. Please traverse the linked list out all the leaf nodes, and then all of a preorder traversal of binary output leaf node, and compare the two outputs to see if the same.
(4) try to write an algorithm to determine whether a binary tree is complete binary tree.
(5) try to write an algorithm to determine whether a binary tree is a binary search tree.
(6) in the main function in a simple menu design, debugging the algorithm, respectively. Platform: |
Size: 6144 |
Author:wumiao |
Hits:
Description: 从左到右及从右到左遍历一个单链表是可能的,其方法是在从左向右遍历的过程中将连接方向逆转,如右图所示。在图中的指针p指向当前正在访问的结点,指针pr指向指针p所指结点的左侧的结点。此时,指针p所指结点左侧的所有结点的链接方向都已逆转。
(1) 编写一个算法,从任一给定的位置(pr, p)开始,将指针p右移k个结点。如果p移出链表,则将p置为0,并让pr停留在链表最右边的结点上。
(2) 编写一个算法,从任一给定的位置(pr, p)开始,将指针p左移k个结点。如果p移出链表,则将p置为0,并让pr停留在链表最左边的结点上。
-From left to right and right to left traverse a single linked list is possible in from left to right during traversal connection direction reversal, as shown on the right. Pointer p points in the diagram is currently being accessed node pointer PR point to the left side of the pointer p junction referred junction. At this point, the pointer p nodes referred to the left all nodes link direction are reversed. (1) preparation of an algorithm, from a given position (PR, P) start, the pointer p to the right k nodes. If p is removed from the linked list, then p is set to 0, and Pr remain in the linked list of the right-most node. (2) the preparation of an algorithm, from any given position (PR, P) start, the pointer p to the left k nodes. If p is removed from the linked list, then p is set to 0, and Pr remain in the linked list of the left-most node. Platform: |
Size: 4096 |
Author:刘洋 |
Hits:
Description: (1)输入字符序列,建立二叉链表。
(2)遍历二叉树输出。
(3)请设计一个算法,要求该算法把二叉树的叶子结点按从左到右的顺序连成一个单链表,表头指针为head。 二叉树按二叉链表方式存储,链接时用叶子结点的右指针域来存放单链表指针。请遍历该链表输出所有叶子结点,然后再先序遍历二叉树输出所有叶子结点,并对比两个输出结果,看是否相同。
(4)试写一算法判断某二叉树是否是完全二叉树。
(5)试写一算法判断某二叉树是否是二叉排序树。
(6)在主函数中设计一个简单的菜单,分别调试上述算法。
-(1) Enter the sequence of characters, build binary list. (2) binary tree traversal output. (3) design an algorithm, the algorithm requires the leaf nodes of a binary tree from left to right together into a single list, table pointer for the head. Binary stored by binary list, to store a single list pointer pointer field with the right leaf node link. Please traverse the list to output all the leaf nodes, and then output the first tree traversal of all leaf nodes, and compare the results of two outputs, to see whether the same. (4) Try to write an algorithm to determine whether a binary tree is a complete binary tree. (5) Try to write an algorithm to determine whether a binary tree is a binary sort tree. (6) Design a simple menu in the main function, namely to debug these algorithms. Platform: |
Size: 2048 |
Author:马序员 |
Hits:
Description: 1) 实现比特填充技术和循环冗余校验算法;
2) 实现HDLC的组帧(Flag、A段、C段、D段、FCS、Flag、包括扩展模式);
3) 实现滑动窗口、差错控制机制;
4) 模拟无噪声链路的数据传输,发送端随机发送数据帧(能够模拟帧丢失、帧失序、帧重复);
5) 模拟有噪声链路的数据传输,发送端发送模拟单比特错误(有能力的同学可以考虑加入多比特错误),要求错误出现在HDLC帧的不同字段,并能够模拟差错控制方法(帧损伤);
6) 给定HDLC的比特流,分别用Manchester编码和键控编码方法来模拟实现并给出结果。
-1) to achieve bit-stuffing technique and cyclic redundancy check algorithm 2) achieve HDLC framing (Flag, A section, C section, D segments, FCS, Flag, including the extended mode) 3) to achieve the sliding window, error control Mechanism 4) analog noise-link data, the transmitting side transmits the random data frame (frame loss to simulate the frame out of order, frame repetition) 5) analog noise data transmission link, the transmitter sends the analog single-bit error (students can be considered capable 加入多比特 error), an error occurs in the different fields required HDLC frames, and can simulate the error control method (frame damage) 6) given HDLC bit streams, respectively, with the Manchester coding and keying coding methods and simulation results are given. Platform: |
Size: 47104 |
Author:詹春艳 |
Hits:
Description: 1) 实现比特填充技术和循环冗余校验算法;
2) 实现HDLC的组帧(Flag、A段、C段、D段、FCS、Flag、包括扩展模式);
3) 实现滑动窗口、差错控制机制;
4) 模拟无噪声链路的数据传输,发送端随机发送数据帧(能够模拟帧丢失、帧失序、帧重复);
5) 模拟有噪声链路的数据传输,发送端发送模拟单比特错误(有能力的同学可以考虑加入多比特错误),要求错误出现在HDLC帧的不同字段,并能够模拟差错控制方法(帧损伤);
6) 给定HDLC的比特流,分别用Manchester编码和键控编码方法来模拟实现并给出结果。
-1) to achieve bit-stuffing technique and cyclic redundancy check algorithm 2) achieve HDLC framing (Flag, A section, C section, D segments, FCS, Flag, including the extended mode) 3) to achieve the sliding window, error control Mechanism 4) analog noise-link data, the transmitting side transmits the random data frame (frame loss to simulate the frame out of order, frame repetition) 5) analog noise data transmission link, the transmitter sends the analog single-bit error (students can be considered capable 加入多比特 error), an error occurs in the different fields required HDLC frames, and control method capable of simulating the error (frame damage) 6) given HDLC bit streams, respectively, with the Manchester coding and keying coding methods and simulation results are given. Platform: |
Size: 47104 |
Author:詹春艳 |
Hits: