联合开发网   搜索   要求与建议
                登陆    注册
排序按匹配   按投票   按下载次数   按上传日期
按分类查找All 数据结构(145) 
按平台查找All C/C++(145) 

[数据结构] rapid-calculation24CPP

速算24 要求: a. 一副牌54张牌,黑桃(SA,SK,SQ,SJ,S10,??,S2),红桃(HA,HK,HQ,HJ,H10,??,H2),方块(DA,DK,DQ,DJ,D10,??,D2),草花(CA,CK,CQ,CJ,C10,??,C2)以及大鬼Q1和小鬼Q2。其中,A,K,Q,J及Q1,Q2的点值分别为:1,13,12,11,1,1。其余点值就是牌值。 b. 由计算机随机出四张牌。 c. 用户输入能算出24的表达式(只能用加、减、乘、除及括号组成的四则运算)。 d. 计算机检验用户给出的表达式正确与否(包括是否用计算机所给出的四张牌),并根据该表达式计算出值,判断用户的方法是否正确。 e. 表达式求值算法参考有关图书。
Quick quick 24 Requirements: A. a deck of 54 cards, the ace of Spades (SA, SK, SQ, SJ, S10,??, S2), red (HA, HK, HQ, HJ, H10,??, H2), (DA, DK, DQ box, DJ, D10,??, D2), flower (CA, CK, CQ, CJ, C10,??, C2) and Q1 and Q2 big ghost kid. Among them, A, K, Q, J and Q1, the Q2 values are: 1, 13, 12, 11, 1, 1. The other point is the brand value. B. by the computer random out four cards. The C. expression of user input can calculate 24 (four operations by means of addition, subtraction, multiplication, addition and braces composed only of). Expression of the D. computer test given by the user (including whether correct or not with the four card computer given), and according to the uated expression value, method of judging whether user s right. E. expression uation algorithm reference books. (2015-01-27, C/C++, 3KB, 下载3次)

http://www.pudn.com/Download/item/id/1422363648440388.html

[数据结构] migonglaoshu

数据结构,迷宫老鼠问题求解 迷宫是一个矩形区域,它有一个入口和一个出口。在迷宫的内部包含不能穿越的墙或障碍。迷宫的入口在左上角,出口在右下角。假定用n*m的矩阵来描述迷宫,位置(1,1)表示入口,(n,m)表示出口,n和m分别代表迷宫的行数和列数。迷宫中的每个位置都可用其行号和列号来指定。在矩阵中,当且仅当在位置(i,j)处有一个障碍时其值为1,否则其值为零。(即0表示能通过,1 表示不能通过。)现假设老鼠从左上角[1,1]进入迷宫,编写算法,寻求一条从右下角[m,n] 出去的路径。 迷宫老鼠问题是一个典型的可以用栈进行求解的问题。题目要求我们首先构造一个可主动输入维数但随机生成的迷宫,用栈的知识讲老鼠每走一步都记录下来,并利用入栈出栈进行出迷宫的路径寻找。
Data structures, maze mouse problem solving maze is a rectangular area, it has an entrance and an exit. Contains in the maze of internal walls or obstacles that can not be crossed. Maze entrance in the upper left corner of the exports in the lower right corner. Is assumed that a matrix of n* m to describe the labyrinth, represented by the position (1,1) inlet, (n, m) said outlet, n and m respectively represent the number of rows and number of columns of the maze. Each position are available in the maze of its row and column numbers specified. In the matrix, when and only when in the position (i, j) at an obstacle when its value is 1, otherwise its value is zero. (Ie 0 means pass, 1 can not.) It is assumed that the mouse from the top left corner [1,1] into the maze, write algorithms to seek a path out from the lower right corner [m, n]. Maze mice is a typical can solve the problem with a stack. The subject requirements we first constructed an active input dimension but randomly generate (2012-09-28, C/C++, 2KB, 下载7次)

http://www.pudn.com/Download/item/id/2003965.html

[数据结构] Dijkstra

迪杰斯克拉无向图最短路径----dijkstra 这是帮同学完成的Project,老外老师的要求果然不同。对于基本算法,不光要求不能使用高级容器类,还要求程序有一定的检验错误能力。花了1天的时间写完,代码考虑结点过多内存占用的问题,因此关系矩阵采用映射的方式存储。由此带来的弊端是,找一个结点的时候需要循环判断,导致效率过低。总之,内存占用与程序效率是鱼与熊掌不可兼得。 代码写的比较凌乱。仅供参考。 Project的要求介绍参考链接: http://hi.baidu.com/yiyiyis/blog/item/1d12842a6ae51c21d52af1d0.html?timeStamp=1292219252654
Dinger undirected graph Sklar---- dijkstra shortest path is to help students complete the Project, the teacher asked foreigners really different. For the basic algorithm, not only asked not to use the advanced containers, also called the inspection program has a certain error capacity. It took 1 day of time to finish, the code takes into account node issue too much memory, so by mapping relationship matrix stored. The resulting drawback is to find a node to determine when the need for recycling, resulting in low efficiency. In short, the efficiency of memory usage and process fish and can not have both. Comparison of writing messy code. For reference only. Project requirements description reference links: http://hi.baidu.com/yiyiyis/blog/item/1d12842a6ae51c21d52af1d0.html?timeStamp=1292219252654 (2010-12-13, C/C++, 186KB, 下载26次)

http://www.pudn.com/Download/item/id/1378618.html

[数据结构] 3_list

三: 针对带表头结点的单链表,试编写下列函数。 (1) 定位函数Locate:在单链表中寻找第i个结点。若找到,则函数返回第i个结点的地址;若找不到,则函数返回NULL。 (2) 求最大值函数max:通过一趟遍历在单链表中确定值最大的结点。 (3) 统计函数number:统计单链表中具有给定值x的所有元素。 (4) 建立函数create:根据一维数组a[n]建立一个单链表,使单链表中各元素的次序与a[n]中各元素的次序相同,要求该程序的时间复杂性为O(n)。 (5) 整理函数tidyup:在非递减有序的单链表中删除值相同的多余结点。
III: Table for the first node with a single list, try to prepare the following function. (1) positioning function Locate: find a single list in the first i nodes. If found, the function returns the first i nodes of the address if not, the function returns NULL. (2) for the maximum function max: traverse through the trip in a single list to determine the value of the largest node. (3) statistical function number: single-chain statistics with a given value of x of all elements. (4) the establishment of function create: the basis of one-dimensional array a [n] the creation of a single list, so that a single list in the order of each element with a [n] in the order of the elements the same time require the complexity of the procedure for O (n). (5) collate function tidyup: in non-descending order to remove a single list of surplus value of the same node. (2009-04-29, C/C++, 16KB, 下载3次)

http://www.pudn.com/Download/item/id/736703.html

[数据结构] 计算分数的精确值

使用数组精确计算M/N(0<M<N<=100)的值。如果M/N是无限循环小数,则计算并输出它的第一循环节,同时要求输出 循环节的起止位置(小数位的序号) *问题分析与算法设计 由于计算机字长的限制,常规的浮点运算都有精度限制,为了得到高精度的计算结果,就必须自行设计实现方法。 为了实现高精度的计算,可将商存放在一维数组中,数组的每个元素存放一位十进制数,即商的第一位存放在第一个元素中,商的第二位存放在第二个元素中....,依次类推。这样就可以使用数组不表示一个高精度的计算结果。 进行除法运算时可以模拟人的手工操作,即每次求出商的第一位后,将余数乘以10,再计算商的下一位,重复以上过程,当某次计算后的余数为0 时,表示M/N为有限不循环小数某次计算后的余数与前面的某个余数相同时,则M/N为无限循环小数,从该余数第一次出现之后所求得的各位数就是小数的循环节。 程序具体实现时,采用了数组和其它一些技巧来保存除法运算所得到的余数和商的各位数。
arrays precise calculation of the M/N (0lt; Mlt; Nlt; = 100) value. If M/N is unlimited circulator, calculated and exporting its first cycle of festivals, while output cycle requirements of section starting and ending location (number of decimal places)* Analysis and design of computer algorithms size limitations, conventional precision floating-point operations have restrictions, in order to have a high-precision the results, we must design their own method. In order to achieve high precision calculations can be stored in a business-dimensional arrays, each array element placed a decimal number, the first one in a storage element, the second in the second storage element ..., followed by analogy. This array can use it does not mean that a highly accurate results. For computing divisi (2005-12-05, C/C++, 1KB, 下载60次)

http://www.pudn.com/Download/item/id/130352.html
总计:145