Determine whether an integer is a palindrome. Do this without extra space.
click to show spoilers.
Some hints:
Could negative integers be palindromes? (ie, -1)
If you are thinking of convertin...
分类:
其他好文 时间:
2015-01-12 00:25:55
阅读次数:
197
The problem:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: ...
分类:
其他好文 时间:
2015-01-11 06:09:14
阅读次数:
197
场景:让用户输入一个数字,程序由1+2....一直累加到用户输入的数字为止#!/bin/bashPATH=$PATH:~/scriptexport PATH#chech whether the input is numfunction is_num(){#判断用户输入的是否是数字,是数字则返回1,否...
分类:
其他好文 时间:
2015-01-10 23:31:48
阅读次数:
224
Determine whether an integer is a palindrome. Do this without extra space.
class Solution
{
public:
bool isPalindrome(int x)
{
if(x < 0)
return false;
int org = ...
分类:
其他好文 时间:
2015-01-08 18:12:09
阅读次数:
124
First it looks to see whether there is a quote before the list; if there is, the interpreter just gives us the list.On the other hand, if there is no ...
分类:
其他好文 时间:
2015-01-05 16:20:05
阅读次数:
144
Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).For example, this binary tree is symmetric: 1 / \ ...
分类:
其他好文 时间:
2015-01-02 22:15:05
阅读次数:
307
http://poj.org/problem?id=3349
Description
You may have heard that no two snowflakes are alike. Your task is to write a program to determine whether this is really true. Your program will read i...
分类:
编程语言 时间:
2015-01-01 18:33:35
阅读次数:
222
Compare two strings A and B, determine whether A contains all of the characters in B.The characters in string A and B are all Upper Case letters.Examp...
分类:
其他好文 时间:
2014-12-31 08:42:03
阅读次数:
228
The questions:Determine whether an integer is a palindrome. Do this without extra space.Analysis:To determine whether an integer is a palindrome, we c...
分类:
其他好文 时间:
2014-12-30 01:41:54
阅读次数:
208
In any project, change is inevitable whether it comes from within the project or from external sources, therefore it makes sense to have an agreed pro...
分类:
其他好文 时间:
2014-12-29 11:40:36
阅读次数:
164