2014年10月17日
摘要: 第一题代码:分析:将字符数组中的每个字符串,找出其中最长的那个与字符数组中长度进行比较:a、当最长的字符串的长度大于等于字符数组的长度时,直接输出b、当最长的字符串的长度小于字符数组的长度时,找出该长度下整数值最大的那个字符串,在前面部0输出package com.njupt;public clas... 阅读全文
posted @ 2014-10-17 20:44 月下美妞1314 阅读(279) 评论(0) 推荐(0) 编辑
  2014年10月7日
摘要: 在多态的学习中,当子类继承父类时,子类中的变量哪些具备多态特性,哪些不具备多特特性。代码:class Father{ public static int x=10; public int y=11; public Father(){ System.out.printl... 阅读全文
posted @ 2014-10-07 22:16 月下美妞1314 阅读(266) 评论(0) 推荐(1) 编辑
  2014年10月4日
摘要: 一、题目描述Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes' values.Fo... 阅读全文
posted @ 2014-10-04 14:57 月下美妞1314 阅读(207) 评论(0) 推荐(0) 编辑
  2014年10月3日
摘要: 首先:强调一个概念定义一个函数为虚函数,不代表函数为不被实现的函数。定义他为虚函数是为了允许用基类的指针来调用子类的这个函数。定义一个函数为纯虚函数,才代表函数没有被实现。定义纯虚函数是为了实现一个接口,起到一个规范的作用,规范继承这个类的程序员必须实现这个函数。1、简介假设我们有下面的类层次:cl... 阅读全文
posted @ 2014-10-03 16:51 月下美妞1314 阅读(1309) 评论(0) 推荐(0) 编辑
  2014年10月2日
摘要: 一、问题描述Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another ... 阅读全文
posted @ 2014-10-02 22:30 月下美妞1314 阅读(197) 评论(0) 推荐(0) 编辑
  2014年9月29日
摘要: 1 阅读全文
posted @ 2014-09-29 00:45 月下美妞1314 阅读(100) 评论(0) 推荐(0) 编辑
  2014年9月28日
摘要: Sort a linked list inO(nlogn) time using constant space complexity.1、分析该题主要考查了链接上的合并排序算法。2、正确代码实现package com.edu.leetcode;import com.edu.leetcode.List... 阅读全文
posted @ 2014-09-28 23:36 月下美妞1314 阅读(1011) 评论(0) 推荐(0) 编辑
  2014年9月25日
摘要: 题目描述:Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array [2,3,-2,... 阅读全文
posted @ 2014-09-25 10:22 月下美妞1314 阅读(342) 评论(0) 推荐(0) 编辑
  2014年9月21日
摘要: 问题描述:在启动datanode进程时,能成功的启动;但用jps查看进程时,发现进程不存在,下面是在datanode日记文件的错误信息如下图的截屏所示:主要原因:发生错误的原因:由于把data放在的tmp的零时目录下,导致格式化之后,datanode中的数据在namenode中无法找相应的句柄。解决... 阅读全文
posted @ 2014-09-21 19:43 月下美妞1314 阅读(297) 评论(0) 推荐(0) 编辑
  2014年8月25日
摘要: 描述给定输入排序元素数目n和相应的n个元素,写出程序,利用内排序算法中两路合并排序算法进行排序,并输出排序最后结果的相应序列。输入共两行,第一行给出排序元素数目n,第二行给出n个元素,1≤n≤100000,每个元素值范围为[0,100000]输出一行,输出排序结果。样例输入7483668721248... 阅读全文
posted @ 2014-08-25 22:01 月下美妞1314 阅读(134) 评论(0) 推荐(0) 编辑