char在C和C+中占一个字节 Java中无论是汉字还是英文字母都是用Unicode编码来表示的,一个Unicode码是16位,每字节是8位,所以一个Unicode码占两字节 /** * The number of bits used to represent a char va...
分类:
编程语言 时间:
2014-08-25 22:37:24
阅读次数:
205
Reverse Integer
Total Accepted: 27372 Total
Submissions: 68133My Submissions
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
题目咋看起...
分类:
其他好文 时间:
2014-08-25 21:12:54
阅读次数:
198
$a="asdfghjklqwe"$b=$nullforeach ($_ in ("$a".length-1)..0){$b +=$a[$_]}$b$a="asdfghjklqwe"$b = $a.ToCharArray()[array]::Reverse($b)$b -join ''
分类:
其他好文 时间:
2014-08-25 16:47:54
阅读次数:
153
总结:其实就是反转链表。不过是反转中间一部分。要注意的是保存第一个结点的前继的指针; 若第一个结点是头结点,注意反转子串的尾结点变为头结点。
分类:
其他好文 时间:
2014-08-25 01:07:43
阅读次数:
198
Squid学习笔记1、安装前的配置编译安装之前需要校正的参数主要包括File Descriptor和Mbuf Clusters。1、File Descriptor查看文件描述符的限制数目:ulimit –n调整文件描述符的数目需要3步:step 1,编辑系统头文件/usr/include/bits/...
分类:
其他好文 时间:
2014-08-24 15:19:02
阅读次数:
214
Add Two Numbers
Total Accepted: 20255 Total
Submissions: 88115My Submissions
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order a...
分类:
其他好文 时间:
2014-08-23 21:40:01
阅读次数:
200
Description
Problem J
Bits
Input: Standard Input
Output: Standard Output
A bit is a binary digit, taking a logical value of either "1" or "0" (also referred to as "true" or "false" respecti...
分类:
其他好文 时间:
2014-08-22 22:35:36
阅读次数:
278
Example 1: Write a function to reverse a string.Example Java code: public static String reverse ( String s ) { int length = s.length(), last =length ....
分类:
其他好文 时间:
2014-08-22 19:42:59
阅读次数:
236
Evaluate Reverse Polish NotationEvaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may ...
分类:
其他好文 时间:
2014-08-22 12:18:26
阅读次数:
135
Reverse Words in a StringGiven an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Clari...
分类:
其他好文 时间:
2014-08-22 10:30:55
阅读次数:
109