题目
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:
Integers in each row are sorted from left to right.The first integer...
分类:
其他好文 时间:
2014-05-15 03:41:11
阅读次数:
257
一、先搭建好struts2,可以通过myeclipse快速搭建。
二、再导入extjs所需的库文件。
三、写一个实体类User
package com.ext.model;
public class User {
private Integer id;
private String username;
private String password;
public Integer...
分类:
Web程序 时间:
2014-05-15 03:14:40
阅读次数:
471
这道题当时不会写,是参照discuss写的。
首先要弄明白罗马数字的规则,这个在国外难道是常识吗,为什么题干一点都没讲。。
4000以下一共有下面几种符号:"M", "D", "C", "L", "X", "V", "I",对应到我们十进制为:1000, 500, 100, 50, 10, 5, 1。还有一条非常重要的规则,就是同样的字符最多重复出现三次。这就决定了数位上带4和9的跟普通的数值...
分类:
其他好文 时间:
2014-05-15 00:02:06
阅读次数:
391
Roman to Integer 罗马数字转化为整数...
分类:
其他好文 时间:
2014-05-14 23:49:52
阅读次数:
515
program Project1;{$APPTYPE CONSOLE}{$R *.res}uses
System.SysUtils;TYPE Trec = record Member1, Member2: Integer; end;CONST IntRec:
Trec = (Member1: 55;...
分类:
其他好文 时间:
2014-05-14 23:18:51
阅读次数:
554
Public Function GetDataFromDSV(fpath As String)
As Collection Dim AllTextFormat(255) As Integer Dim i As Long For i = 0 To 255
AllTextF...
分类:
其他好文 时间:
2014-05-14 22:32:10
阅读次数:
470
Integer to Roman 罗马数字的转换...
分类:
其他好文 时间:
2014-05-14 21:40:53
阅读次数:
268
【题目】
Implement atoi to convert a string to an integer.
Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below and ask yourself what are the possible input cases.
Notes: It is intended for this problem to be s...
分类:
其他好文 时间:
2014-05-14 21:00:57
阅读次数:
304
【题目】
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
【题意】
反转int型整数,输出的也是int型的整数
【思路】
如要考虑两种特殊情况:
1. 类似100这样的整数翻转之后为1
2. 翻转之后的值溢出该如何处理,
本题的测试用例中似乎没有给出溢出的情况
...
分类:
其他好文 时间:
2014-05-14 20:41:19
阅读次数:
244
【题目】
Determine whether an integer is a palindrome. Do this without extra space.
【题意】
题意判断一个整数是否是回文数
注意一下几点:
1. 不能用额外的空间
2. 负数不是回文数...
分类:
其他好文 时间:
2014-05-14 20:31:10
阅读次数:
298