Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - ie
Search - ie - List
求解约瑟夫问题。设有n个人围成一个圆圈坐下,对所有围从的人从某个位置开始编号为1,2,3,……,n,从编号为1的人开始报数1,报数依交进行,报数n的人即出列,下一个人从1开始报数,再报数m的人便是第二个出列的人如此重复下去,直到最后一个人出列为止,于是便得到一个出列的顺序,这称之为约瑟夫(Josephu)问题。-solving problems. N individuals have formed a circle to sit down, all right Wai from the start from a position of No. 1, 2, 3, ..., n, for a number of people reported a few, according to several newspaper pay, the newspaper n ie the out, the next person was from the beginning a few , and reported m is the second out of this series continue to repeat until the final out in a series, then get a series out of order, which called Joseph (Josephu) problem.
Date : 2026-01-10 Size : 8kb User : 葛林

1)创建任意整数线性表(即线性表的元素值随机在键盘上输入),长度限定在25之内; 2)打印(遍历)该线性表(依次打印出表中元素值); 3)在线性表中查找第i个元素,并返回其值; 4)在线性表中第i个元素之前插入一已知元素; 5)在线性表中删除第i个元素; 6)求线性表中所有元素值(整数)之和; -1) the creation of arbitrary integer linear form (ie linear table-valued random element in the keyboard input), the length limit of 25 2) Print (traverse) the linear form (print out the table followed by the element value) 3) online search of the table the first i elements, and return its value 4) line of the table the first i elements inserted before the one known element 5) line of the table to delete the first i elements 6) seeking all the elements of a linear table value (integer), and the
Date : 2026-01-10 Size : 61kb User : zxp

《数据结构及应用算法教程》配书光盘 1. 算法一览是由HTML页面形式的文件组织的,使用时系统需要安装Microsoft IE 5.0、Office 2000 Word和PowerPoint。读者可以从“算法一览”文件夹下的index.htm文件开始浏览。2. “程序设计示例”文件夹下汇集了本书第10章中八个示例的源代码。读者可以在配有Microsoft Visual C++5.0以上版本的环境中,通过重新建立工程文件来编译和运行。具体的细节步骤,可继续阅读“程序设计示例”文件夹下的Readme.doc文件。
Date : 2026-01-10 Size : 689kb User : 刘真

表达式求值 用户按平时习惯输入数字算术表达式(即中缀表达式)后,输出对应的后缀表达式,并求出表达式的值。可借此熟悉栈的操作。 可供学习《数据结构》(清华大学出版社)(P52表达式求值)、《数据结构课程设计》(机械工业出版社)(P37表达式求值问题)时参考,本程序优于书中算法,并支持浮点型-Expression evaluated by the usual habits of the user input the number of arithmetic expressions (ie infix expressions), the output of the corresponding suffix expression, and calculated the value of expression. Will be able to familiar with the stack operation. For learning data structure (Tsinghua University Press) (P52 expression evaluation), Data Structure Course Design (Mechanical Industry Press) (P37 expression evaluation problem) reference, this procedure is superior to the book algorithm, and to support the floating-point type
Date : 2026-01-10 Size : 1kb User : XY Z

DL : 0
有时需要测试2 个数据结构的同构性,即2个同构的结构在相应的位置具有相同结点数 和分枝数。试设计一个递归函数用于测试2 棵二叉树是否同构。-Sometimes need to test two data structure isomorphism, ie isomorphism of two structures in the corresponding location with the same number of nodes and branches. Test the design of a recursive function used to test whether two binary tree isomorphism.
Date : 2026-01-10 Size : 1kb User : 刘丹

DL : 0
有时需要测试2 个数据结构的同构性,即2个同构的结构在相应的位置具有相同结点数 和分枝数。试设计一个递归函数用于测试2 棵二叉树是否同构。-Sometimes need to test two data structure isomorphism, ie isomorphism of two structures in the corresponding location with the same number of nodes and branches. Test the design of a recursive function used to test whether two binary tree isomorphism.
Date : 2026-01-10 Size : 1kb User : 杨哲

4. 假设有两个按数据元素值非递减有序排列的线性表A和B,均以单链表作为存储结构。编写算法将A表和B表归并成一个按元素值递减有序(即非递增有序,允许值相同)排列的线性表C。-4. Assuming there are two data elements according to the value of non-decreasing in an orderly array of linear forms A and B, are single-linked list as a storage structure. A table prepared algorithm and B merge into a table element values by diminishing orderly (ie non-incremental and orderly, allowing the same value) with the linear form C.
Date : 2026-01-10 Size : 1kb User : 蕾蕾

DL : 0
设有由n个不相同的整数组成的数列,记为: a(1)、a(2)、……、a(n)且a(i)<>a(j) (i<>j) 例如3,18,7,14,10,12,23,41,16,24。 若存在i1<i2<i3< … < ie 且有a(i1)<a(i2)< … <a(ie)则称为长度为e的不下降序列。如上例中3,18,23,24就是一个长度为4的不下降序列,同时也有3,7,10,12,16,24长度为6的不下降序列。程序要求,当原数列给出之后,求出最长的不下降序列。-By n with non-integer composed of the same series, recorded as: a (1), a (2), ... ..., a (n) and a (i) < > a (j) (i < > j ) For example 3,18,7,14,10,12,23,41,16,24. If there is i1 <i2<i3< … < ie 且有a(i1)<a(i2)< … <a(ie)则称为长度为e的不下降序列。如上例中3,18,23,24就是一个长度为4的不下降序列,同时也有3,7,10,12,16,24长度为6的不下降序列。程序要求,当原数列给出之后,求出最长的不下降序列。
Date : 2026-01-10 Size : 1kb User : www_007gzs_com

The task in this assignment is to implement an airline routing system. Your system should be able to read in a ight network as a graph from a le, where airports are represented as vertices and ights between airports are represented as edges, take as input two airports and calculate the shortest route (ie path) between them.
Date : 2026-01-10 Size : 26kb User : unknown9218

DL : 0
实现二分法求解方程。编写并使用以下函数: double SolveRoot(double(*pf)(double x),double a,double b,int n) 这里,pf指向一个函数f,f用来定义要求解的方程f(x)=0,a和b是未知解x的上下界(即a<=x<=b), n是循环次数。例如,如果f(x)=x*x-2,则SolveRoot (f,1,2,100)将返回1.414213562373095, 即方程为x*x=2的解。二分法的原理是反复地把区间分为两个相等区间,然后用其中含有解的一半代替该区间, 依次类推,得到满足精度的解。它通过检查f(a)和f(b)的符号来判断解是否在区间中。-Achieve the dichotomy solve the equations. To prepare and use the following function: double SolveRoot (double (* pf) (double x), double a, double b, int n) here, pf points to a function f, f used to define the required solution of the equation f (x) = 0 , a and b are unknown solution x of the upper and lower bounds (ie, a < = x < = b), n is the cycle number. For example, if f (x) = x* x-2, then the SolveRoot (f, 1,2,100) will return 1.414213562373095, that is, the equation x* x = 2 solution. Dichotomy of the principle is repeatedly the range is divided into two equal intervals, then half of them containing solution instead of the interval, and so on, accuracy of the solution are met. It does this by checking f (a) and f (b) solutions of the symbol to determine whether the interval.
Date : 2026-01-10 Size : 1.11mb User : 闻悦

一个单向循环链表来表示队列(即循环链队),该队列只设一个队尾指针,不设队首指针,实现以下算法: 1)向循环链队插入一个元素值为x的结点。 2)从循环链队中删除一个结点。 3)访问队列 -A one-way circular list to represent the queue (ie, cycle chain team), the queue tail pointer only to set up a team with no team in the first pointer, to achieve the following algorithm: 1) to insert an element of circular chain of team value of x, nodes. 2) From the cycle chain team to remove a node. 3) Access Queue
Date : 2026-01-10 Size : 1kb User : 张敏

n皇后问题可以表示成n-元组(x1,…,xn),其中xi是放在第i行的皇后所在的列号。于是,解空间由nn个n-元组组成。 显示约束条件为Si={1,2,…….,n},1 i  n。 隐式约束条件之一为没有两个xi相同(即任意两个皇后不在同一列上)。将其加入到显式条件中,于是解空间的大小由nn个元组减少到n!个元组。 -n queens problem can be expressed as n-tuple (x1, ..., xn), where xi is the queen on the first i rows where the column number. As a result, the solution space by the nn a n-tuple integral. Shows the constraints for the Si = (1,2, ... ...., N), 1  i  n. One of the implicit constraint that no two xi the same (ie any two Queen' s not in the same column). Be added to the explicit conditions, so the solution space the size of a tuple from nn reduced to n! A tuple.
Date : 2026-01-10 Size : 1kb User : lily

假设有两个按元素值递增有序排列的线性表A和B,均以单链表作存储结构,请编写算法将A表和B表归并为一个按元素值递减 有序(即非递增有序,允许表中含有值相同的元素)排列的线性表C,并要求利用原装(即A表和B表)的结点空间构造C表。-Suppose there are two elements of value increasing by an ordered arrangement of the linear forms A and B, are linked to a single storage structure, write the algorithm to A and B table table combined into a descending order by element value (ie, a non-incremental order to allow the table contains the value of the same element) arranged in a linear form C, and require the use of original (ie, A and B Table Table) node spatial structure C table.
Date : 2026-01-10 Size : 1kb User : 吴立国

DL : 0
假设以两个元素依值递增有序排列的线性表A和B分别表示来年各个几何(即 同一表中的元素值各不相同),现要求另辟空间构成一个线性表C,其元素为 A和B中元素的交集,且表C中的元素也依值递增有序排列。试对顺序表编写 求C的算法-Assuming the two elements by increasing the value of an ordered arrangement of the linear forms A and B, respectively, in the coming year all geometric (ie, the elements of the same table, different values), are now required to open up space to form a linear form C, whose elements elements for the A and B in the intersection, and Table C elements are arranged according to the value of increasing order. Written request on the order of the table test the algorithm C
Date : 2026-01-10 Size : 1kb User : 吴立国

DL : 0
围绕着山顶有10个圆形排列的洞,狐狸要吃兔子,兔子说:“可以,但必须找到我,我就藏身于这十个洞中,你先到1号洞找,第二次隔1个洞(即3号洞)找,第三次隔2个洞(即6号洞)找,以后如此类推,次数不限。”但狐狸从早到晚进进出出了1000次,仍没有找到兔子。问兔子究竟藏在哪个洞里?-Peak around the circular array of 10 holes, the fox eat the rabbit, the rabbit said: " Yes, but you find me, I' ll hide in these ten hole, you first find the 1st hole, the second compartment 1 hole (ie, hole No. 3) looking for a third every 2 holes (ie hole No. 6) to find, since so on unlimited number of times. " But the fox morning till night and out of the 1000, still have not found rabbit. Asked the rabbit hole in which is hiding?
Date : 2026-01-10 Size : 1.32mb User : lsr

随机产生或键盘输入一组元素,建立一个带头结点的单链表(无序)。 2.遍历单链表(即输出单链表中各结点元素)。 3.把单链表中元素逆置。 4.在单向链表中删除所有的偶数元素结点。 5.编写在非递减有序链表中插入一个元素使链表元素仍有序的函数,并利用该函数建立一个非递减有序单链表。 6.利用算法5建立两个非递减有序单链表,然后合并成一个非递减有序单链表。 -Randomly generated or keyboard input of a group of elements, the establishment of a lead single linked list node (disorder). 2. Traverse a single list (ie the output of each node in a single list element). 3. Single list of elements in the inverse set. 4. Remove all one-way linked list in the even elements of nodes. 5. Written in non-decreasing order to insert an element in the list is still ordered list element function, and use this function to create a single linked list of non-decreasing order. 6. Using algorithms to create two non-decreasing order 5 single linked list, and then combined into a single list of non-decreasing order.
Date : 2026-01-10 Size : 1kb User : 乔乔

围绕着山顶有10个圆形排列的洞,狐狸要吃兔子,兔子说:“可以,但必须找到我,我就藏身于这十个洞中,你先到1号洞找,第二次隔1个洞(即3号洞)找,第三次隔2个洞(即6号洞)找,以后如此类推,次数不限。”但狐狸从早到晚进进出出了1000次,仍没有找到兔子。问兔子究竟藏在哪个洞里 ? -Peak around the circular array of 10 holes, the fox eat the rabbit, the rabbit said: " Yes, but you find me, I' ll hide in these ten holes, hole No. 1 you are looking for first, second compartment 1 hole (ie, hole No. 3) looking for a third every 2 holes (ie hole No. 6) to find, since so on unlimited number of times. " But the fox morning till night and out of the 1000, still have not found rabbit. Asked the rabbit hole in which is hiding?
Date : 2026-01-10 Size : 1kb User : lxc

DL : 0
松弛因子的介绍(“松弛迭代法是高斯-塞德尔迭代法的一种加速方法,基本思想是将高斯-塞德尔迭代法得到的第k+1次近似解向量与第k次近似解向量作加权平均,当权因子(即松弛因子)w选择是适当时,加速效果很明显。因此这个方法最关键的是如何选取最佳松弛因子。")和算法。-Relaxation factor of the introduction (" relaxation method is the Gauss- Seidel iteration method for an accelerated method, the basic idea is to Gauss- Seidel iteration the first k+1 obtained for solution vector with the first k for solution vector as the weighted average, power factor (ie the relaxation factor) w option is appropriate to accelerate the effect is obvious. Therefore, this method is how to select the most critical optimal relaxation factor. " ) and algorithms.
Date : 2026-01-10 Size : 4kb User : 陈倩倩

DL : 0
huffman 哈夫曼编/译码器 利用哈夫曼编码进行通信可以大大提高1言道利用率,缩短信息传速时间,降低传输成本。但是.这要求在发送端通过一个编码系统对待传数据预先编码.在接收端将传来的数据进行译码(复原)。对于双工信道(即可以双向传输俏息的信道),每端都需要一个完整的编/译码系统。试为这样的信息收发站写一个哈夫曼码的编/译码系统。 -huffman Huffman encoder/decoder to communicate using Huffman coding can greatly improve a speech channel utilization, reduce the speed of information transmission time and reduce transport costs. However. This requires the sender to pass through a coding system to treat the data pre-encoding. At the receiving end to decode data from the (recovery). For the duplex channel (ie, interest rates can be pretty two-way transmission channel), each side needs a complete encoding/decoding system. Test for such messaging station to write a Huffman encoding/decoding system.
Date : 2026-01-10 Size : 2kb User : 尘封

DL : 0
一、顺序表的基本操作实现实验 要求:数据元素类型ElemType取整型int。按照顺序存储结构实现如下算法: 1)创建任意整数线性表(即线性表的元素值随机在键盘上输入)的顺序存储结构(即顺序表),长度限定在25之内; 2)打印/显示(遍历)该线性表(依次打印/显示出表中元素值); 3)在顺序表中查找第i个元素,并返回其值; 4)在顺序表第i个元素之前插入一已知元素; 5)在顺序表中删除第i个元素; 6)求顺序表中所有元素值(整数)之和; 二、链表(带头结点)基本操作实验 要求:数据元素类型ElemType取字符型char。按照动态单链表结构实现如下算法: 1)按照头插法或尾插法创建一个带头结点的字符型单链表(链表的字符元素从键盘输入),长度限定在10之内; 2)打印(遍历)该链表(依次打印出表中元素值,注意字符的输入顺序与链表的结点顺序); 3)在链表中查找第i个元素,i合法返回元素值,否则,返回FALSE; 4)在链表中查找与一已知字符相同的第一个结点,有则返回TRUE,否则,返回FALSE; 5)在链表中第i个结点之前插入一个新结点; 6)在线性表中删除第i个结点; 7)计算链表的长度。 -First, the basic operation of the order of the table to achieve experimental Requirements: Data element type ElemType take integer int. Storage structure in accordance with the order to achieve the following algorithm: 1) Create an arbitrary integer linear form (ie, the value of a random linear form of the element type on the keyboard) the order of storage structure (ie the order of the table), length Limited to 25 months 2) Print/display (through) the linear form (followed by print/display the table element values) 3) the table in order to find the i-th element and return its value 4) In order sheet is inserted before the i-th element of a known element 5) In order to remove the table i-th element 6) Find the order of all elements of the table value (integer) and Second, the list (the lead node) Basic operation test Requirements: take the character data element types ElemType char. Single-chain structure in accordance with the dynamic algorithm to achieve the
Date : 2026-01-10 Size : 3kb User : goudezong
« 12 »
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.