虫虫首页| 资源下载| 资源专辑| 精品软件
登录| 注册

3.<b>1</b>

  • ADT BinaryTree 的实现及验证程序采用的主要数据结构:二叉树、栈、队算法思想:1、 先序建树、输出树、后序遍历用递归方法。性能分析:O( n )2、 先序遍历、中序遍历:性能分析:O( n

    ADT BinaryTree 的实现及验证程序采用的主要数据结构:二叉树、栈、队算法思想:1、 先序建树、输出树、后序遍历用递归方法。性能分析:O( n )2、 先序遍历、中序遍历:性能分析:O( n )(1) 若遇到新节点非空则先入栈,然后访问其左子树。(2) 若为空则将栈顶结点出栈,访问其右子树。(3) 循环1、2直到栈为空且无节点可入栈。先序与中序的区别是:先序在入栈时访问节点,中序在出栈时访问节点。3、 层遍历:性能分析:O( n )(1) 根节点入队(2) 节点出队并访问(3) 若节点有左孩子,则左孩子入队;有右孩子,则右孩子入队。(4) 重复2、3直到队列为空。4、 线索树:算法与先序遍历、中序遍历一样,只是将访问节点的Visit函数改为连接前驱与后继的操作。性能分析:O(

    标签: BinaryTree ADT 性能分析

    上传时间: 2014-12-20

    上传用户:SimonQQ

  • 数字运算

    数字运算,判断一个数是否接近素数 A Niven number is a number such that the sum of its digits divides itself. For example, 111 is a Niven number because the sum of its digits is 3, which divides 111. We can also specify a number in another base b, and a number in base b is a Niven number if the sum of its digits divides its value. Given b (2 <= b <= 10) and a number in base b, determine whether it is a Niven number or not. Input Each line of input contains the base b, followed by a string of digits representing a positive integer in that base. There are no leading zeroes. The input is terminated by a line consisting of 0 alone. Output For each case, print "yes" on a line if the given number is a Niven number, and "no" otherwise. Sample Input 10 111 2 110 10 123 6 1000 8 2314 0 Sample Output yes yes no yes no

    标签: 数字 运算

    上传时间: 2015-05-21

    上传用户:daguda

  • The government of a small but important country has decided that the alphabet needs to be streamline

    The government of a small but important country has decided that the alphabet needs to be streamlined and reordered. Uppercase letters will be eliminated. They will issue a royal decree in the form of a String of B and A characters. The first character in the decree specifies whether a must come ( B )Before b in the new alphabet or ( A )After b . The second character determines the relative placement of b and c , etc. So, for example, "BAA" means that a must come Before b , b must come After c , and c must come After d . Any letters beyond these requirements are to be excluded, so if the decree specifies k comparisons then the new alphabet will contain the first k+1 lowercase letters of the current alphabet. Create a class Alphabet that contains the method choices that takes the decree as input and returns the number of possible new alphabets that conform to the decree. If more than 1,000,000,000 are possible, return -1. Definition

    标签: government streamline important alphabet

    上传时间: 2015-06-09

    上传用户:weixiao99

  • 目录 摘要 ABSTRACT 前言 第一章 为什么要开发一个学生档案管理系统? 第二章 计算机已经成为我们学习和工作的得力助手 1.1 在中小学中用计算机管理学生档案的意义 1.2 为

    目录 摘要 ABSTRACT 前言 第一章 为什么要开发一个学生档案管理系统? 第二章 计算机已经成为我们学习和工作的得力助手 1.1 在中小学中用计算机管理学生档案的意义 1.2 为将来学校上网做好准备 1.4 学生档案的设计分析 第三章 怎样开发一个学生档案管理系统? 2.1 编程环境的选择 2.2 关系型数据库的实现 2.3 二者的结合(DBA) 第四章 Windows下的Visual Basic 编程环境简介 3.1 告别“hello world”的年代

    标签: ABSTRACT 计算机 目录 管理系统

    上传时间: 2014-01-17

    上传用户:wfeel

  • 上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P)

    上下文无关文法(Context-Free Grammar, CFG)是一个4元组G=(V, T, S, P),其中,V和T是不相交的有限集,S∈V,P是一组有限的产生式规则集,形如A→α,其中A∈V,且α∈(V∪T)*。V的元素称为非终结符,T的元素称为终结符,S是一个特殊的非终结符,称为文法开始符。 设G=(V, T, S, P)是一个CFG,则G产生的语言是所有可由G产生的字符串组成的集合,即L(G)={x∈T* | Sx}。一个语言L是上下文无关语言(Context-Free Language, CFL),当且仅当存在一个CFG G,使得L=L(G)。 *⇒ 例如,设文法G:S→AB A→aA|a B→bB|b 则L(G)={a^nb^m | n,m>=1} 其中非终结符都是大写字母,开始符都是S,终结符都是小写字母。

    标签: Context-Free Grammar CFG

    上传时间: 2013-12-10

    上传用户:gaojiao1999

  • palm编成,这种书很少,有兴趣看看 Title: Palm Programming: The Developer s Guide URL: http://safari.oreilly.com/J

    palm编成,这种书很少,有兴趣看看 Title: Palm Programming: The Developer s Guide URL: http://safari.oreilly.com/JVXSL.asp?x=1&mode=section&sortKey=rank&sortOrder=desc&view=book&xmlid=1-56592-525-4&open=false&srchText=palm+programming&code=&h=&m=&l=1&catid=&s=1&b=1&f=1&t=1&c=1&u=1&page=0 ISBN: 1-56592-525-4 Author: Julie McKeehan/ Neil Rhodes Publisher: O Reilly Page: 478 Edition: 1st edition (December 1998) Catalog: PDA programming / Palm Format: pdf Size: 2.06M Supplier: Summary: Emerging as the bestselling hand-held computers of all time, PalmPilots have spawned intense developer activity and a fanatical following. Used by Palm in their developer training, this tutorial-style book shows intermediate to experienced C programmers how to build a Palm application from the ground up. Includes a CD-ROM with source code and third-party developer tools

    标签: Programming Developer oreilly safari

    上传时间: 2013-12-10

    上传用户:litianchu

  • 基于C/S模式的考试系统的研究与开发 1 1. 前言 1 1.1 MICROSOFT VISUAL STUDIO .NET 2003开发平台和C#语言的特点 1 1.2用C/S模式开发计算机考试

    基于C/S模式的考试系统的研究与开发 1 1. 前言 1 1.1 MICROSOFT VISUAL STUDIO .NET 2003开发平台和C#语言的特点 1 1.2用C/S模式开发计算机考试系统的优越性 1 2. 系统分析 2 2.1系统基本情况描述 2 2.2 可行性分析 2 2.3 需求分析 3 2.3.1采用SA方法画出计算机考试系统的一套分层数据流图 3 2.3.2数据词典 4 3. 系统设计 4 3.1系统配置 4 3.2系统概要设计 4 3.2.1系统结构图 4 3.2.2模块功能及界面设计 4 3.2.3模块界面设计 5 3.3系统详细设计 6 3.3.1模块详细设计 6

    标签: MICROSOFT VISUAL STUDIO 2003

    上传时间: 2013-12-26

    上传用户:dragonhaixm

  • delphi7企业人力资源管理系统 目 录 1、绪论 4 1.1 选题背景 4 1.2 本系统所采用的技术 5 2、系统分析 6 2.1 系统框架及功能模块 6 2.2 系统流程 7

    delphi7企业人力资源管理系统 目 录 1、绪论 4 1.1 选题背景 4 1.2 本系统所采用的技术 5 2、系统分析 6 2.1 系统框架及功能模块 6 2.2 系统流程 7 2.3 系统的功能模块分析 8 2.3.1机构编制管理 8 2.3.2职员信息管理模块 9 2.3.3薪资福利管理模块 10 3、系统设计 12 3.1 系统的数据库设计 12 3.1.1组织机构编码表 12 3.1.2职员基本信息表 12 3.1.3个人所得税表 13 3.1.4职员奖励表 13 3.1.5月工资统计表 14 3.2 系统界面设计 15 3.2.1程序运行界面展示 15 3.2.2界面具体设计 16 结束语 17 参考文献 18

    标签: delphi 1.1 1.2 2.1

    上传时间: 2014-01-27

    上传用户:zsjinju

  • 设给定n 个变量1 x , 2 x ,…, n x 。将这些变量依序作底和各层幂

    设给定n 个变量1 x , 2 x ,…, n x 。将这些变量依序作底和各层幂,可得n重幂如下 n x x x x  3 2 1 这里将上述n 重幂看作是不确定的,当在其中加入适当的括号后,才能成为一个确定的 n 重幂。不同的加括号方式导致不同的n 重幂。例如,当n=4 时,全部4重幂有5个。

    标签: 变量

    上传时间: 2015-10-28

    上传用户:1101055045

  • 给定n个整数a , a , ,an 1 2  组成的序列。序列中元素i a 的符号定义为: ï î ï í ì - < = > =

    给定n个整数a , a , ,an 1 2  组成的序列。序列中元素i a 的符号定义为: ï î ï í ì - < = > = 1 0 0 0 1 0 sgn( ) i i i i a a a a 符号平衡问题要求给定序列的最长符号平衡段的长度L,即: þ ý ü î í ì = + - = å = £ £ £ max 1| sgn( ) 0 1 j k i i j n k L j i a 。 例如,当n=10,相应序列为:1,1,-1,-2,0,1,3,-1,2,-1 时,L=9。

    标签: iuml 61516 icirc 序列

    上传时间: 2015-10-28

    上传用户:xaijhqx