![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法学习
jiang617325814
这个作者很懒,什么都没留下…
展开
-
1000:A+B problem
Problem DescriptionCalculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample Ou原创 2012-05-24 16:02:16 · 579 阅读 · 0 评论 -
1001:Sum Problem
Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.InputThe input will consist of a series原创 2012-05-24 19:30:41 · 697 阅读 · 0 评论 -
1001:Sum Problem
Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.InputThe input will consist of a series...2012-05-24 19:30:00 · 72 阅读 · 0 评论 -
1000:A+B problem
Problem Description Calculate A + B.InputEach line will contain two integers A and B. Process to end of file.OutputFor each case, output A + B in one line.Sample Input1 1Sample...原创 2012-07-02 11:01:55 · 246 阅读 · 0 评论 -
计算车站距离
public final class Demo { private static int[] miles = new int[5]; private static String[] stations = {"S1","S2","S3","S4","S5","S6"}; public static void main(String[] args) { St原创 2015-01-25 22:22:02 · 291 阅读 · 1 评论 -
线性表实现(JAVA)
package NodeList;public class ListStructs { final int MAXSIZE = 20; //存储空间分配量 Object data[]; //数组存储的数据元素,最大值为MAXSIZE static int length; //顺序表长度 /** * 初始化线性表 * @return 线性表长度 ...原创 2013-09-26 10:15:16 · 90 阅读 · 0 评论 -
直接插入排序
public class InsertSort { /** * 直接插入排序算法 * 将一个记录插入到已经排序好的有序表中 * @param args */ public static void main(String[] args){ int num[] = {44,1,3,5,2,8,4,9,7,6,21,11,2,99}; int temp...原创 2014-09-01 10:44:01 · 120 阅读 · 0 评论 -
求最大连续子序列长度(阿里巴巴2015研发岗机试算法第一题)
由于准备不充分,妥妥的被阿里虐了。import java.util.Scanner;public class GetMaxSeqLength { /** * 题目: * 给定一个query和一个text,均由小写字母组成。 * 要求在text中找出以同样的顺序连续出现在query中的最长连续字母序列的长度。 * 例如, query为“acbac”,tex...原创 2014-09-01 17:09:02 · 176 阅读 · 0 评论