Given a positive integer, return its corresponding column title as appear in an Excel sheet.For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 ...
分类:
编程语言 时间:
2015-06-06 00:27:09
阅读次数:
171
题目: Given two sorted integer arrays A and B, merge B into A as one sorted array.Note: You may assume that A has enough space (size that is gre...
分类:
其他好文 时间:
2015-06-05 22:26:08
阅读次数:
187
题目:Reverse digits of an integer.Example1:x = 123, return 321Example2:x = -123, return -321click to show spoilers.Have you thought about this?Here are ...
分类:
其他好文 时间:
2015-06-05 15:42:07
阅读次数:
120
kebabTime Limit: 1000msMemory Limit: 32768KBThis problem will be judged onHDU. Original ID:288364-bit integer IO format:%I64d Java class name:MainAlmo...
分类:
其他好文 时间:
2015-06-05 13:54:57
阅读次数:
116
http://poj.org/problem?id=1741
Description
Give a tree with n vertices,each edge has a length(positive integer less than 1001).
Define dist(u,v)=The min distance between node u and v.
Give a...
分类:
其他好文 时间:
2015-06-05 12:16:55
阅读次数:
317
自动装箱的一个例子:Integer i = 1; //实际上是执行了Integer i = Integer.valueOf(1)自动拆箱的一个例子:Integer a =1;int b = a; //自动拆箱就是从对象中把基本数据取出来Integer自动拆箱的一个好玩的例子:Integer a = ...
分类:
编程语言 时间:
2015-06-05 11:45:31
阅读次数:
152
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another ex...
分类:
编程语言 时间:
2015-06-05 11:34:10
阅读次数:
147
Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as the Hamming weight).For example, the 32-bit integer ’11' has binary representation 0000000000000...
分类:
其他好文 时间:
2015-06-05 10:13:12
阅读次数:
133
Reverse Integer
题目要求:给定一个int 类型值,求值的反转,如下:
Example1: x
= 123, return 321
Example2: x = -123, return -321
简单问题一般蕴含细节的处理。思路很简单,直接贴Java程序:
public class Solution {
public int r...
分类:
编程语言 时间:
2015-06-05 00:43:47
阅读次数:
203
Description
We say that integer x, 0 < x < p, is a primitive root modulo odd prime p if and only if the set { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, …, p-1 }. For example, the consecutive power...
分类:
其他好文 时间:
2015-06-04 22:54:39
阅读次数:
231