码迷,mamicode.com
首页 >  
搜索关键字:pascals triangle    ( 1342个结果
Leet Code OJ 119. Pascal's Triangle II [Difficulty: Easy]
题目: Given an index k, return the kth row of the Pascal’s triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k) extra space?翻译: 给定一个下标k,返回第...
分类:其他好文   时间:2016-03-22 15:06:03    阅读次数:172
Leet Code OJ 118. Pascal's Triangle [Difficulty: Easy]
题目: Given numRows, generate the first numRows of Pascal’s triangle. For example, given numRows = 5, Return[ [1], [1,1], [1,2,1], [1,3,3,1], [1,4,6,4,1] ]翻译: 给定一个数numRows,产生前numRows行的...
分类:其他好文   时间:2016-03-22 12:31:10    阅读次数:153
软件测试学习笔记:Junit入门
软件测试的第一次上机课上,第一次使用JUint对项目进行测试。 安装是最开始要进行的工作,JUint的安装是比较容易的,只需将需要的jar包引入到项目中即可 最开始的Triangle代码如下: Junit生成的单元测试代码如下 用 a = 0, b = 0, c = 0 作为三边后,上述测试代码结果
分类:其他好文   时间:2016-03-20 11:42:53    阅读次数:153
软件测试上机实验
要求:写程序判断3个整数组成的边围成的图形是否为三角形,且判断出等边三角形,等腰三角形,不等边三角形。编写的java代码如下: public class triangle { public String f(int a, int b, int c){ if(a==0||b==0||c==0||a+b
分类:其他好文   时间:2016-03-20 00:46:34    阅读次数:176
软件测试第一次上机
Description of triangle problem: Function triangle takes three integers a,b,c which are length of triangle sides; calculates whether the triangle is e
分类:其他好文   时间:2016-03-20 00:31:36    阅读次数:141
Lab 1: Write a java program for the triangle problem and test the program with Junit.
Tasks: 1. Install Junit(4.12), Hamcrest(1.3) with Eclipse 将两个jar包添加到工程中 2. Install Eclemma with Eclipse 3. Write a java program for the triangle probl
分类:编程语言   时间:2016-03-19 23:06:04    阅读次数:695
上机实验
源程序代码: package junit01; public class triangle { public String s(int a,int b,int c){ if(a + b <= c||b + c <= a||a + c <= b||a*b*c <= 0) return("不是三角形")
分类:其他好文   时间:2016-03-19 17:43:30    阅读次数:166
软件测试 Lab1
一、安装Junit及Hamcrest 1. 在Intellij IDEA中新创建一个工程。 2. 右键->Open Module Settings->Libraries,添加Junit及Hamcrest。jar包导入完成。 二、创建三角形类Triangle。 三角形的情况分为: “不是三角形”,“等
分类:其他好文   时间:2016-03-19 01:03:36    阅读次数:148
poj-1163-The Triangle
Description Input Output Sample Input Sample Output
分类:其他好文   时间:2016-03-18 23:05:26    阅读次数:176
FZU1004-Number Triangle经典动归题,核心思路及代码优化
Consider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the
分类:其他好文   时间:2016-03-18 19:54:23    阅读次数:223
1342条   上一页 1 ... 62 63 64 65 66 ... 135 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!