大字节序(Big Endian):低地址存高位小字节序(Little Endian):高地址存地位int main(){ int x=1; char *temp = NULL; temp= (char *)&x; if (*temp =...
分类:
其他好文 时间:
2014-06-22 23:23:02
阅读次数:
202
Given a sorted array of integers, find the starting and ending position of a given target value.
Your algorithm's runtime complexity must be in the order of O(log n).
If the target is not found ...
分类:
其他好文 时间:
2014-06-22 21:47:15
阅读次数:
269
静态工厂方法与设计模式中的工厂方法模式不同,和设计模式中的工厂方法模式不直接对应。
使用静态工厂方法比构造器的优势:
第一、静态工厂方法是有名称的,而构造器是通过参数判断的。
每个静态工厂方法都有自己的名字,可以根据名称就可以判断它要做什么事情,而构造器是做不到的。
如:构造器BigInteger(int,int),返回BigInteger可以是素数,偶数等,而用名称Big...
分类:
其他好文 时间:
2014-06-22 19:03:32
阅读次数:
213
题目:
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subsets.
...
分类:
其他好文 时间:
2014-06-22 17:51:54
阅读次数:
196
1、
??
Subsets
Given a set of distinct integers, S, return all possible subsets.
Note:
Elements in a subset must be in non-descending order.The solution set must not contain duplicate subset...
分类:
其他好文 时间:
2014-06-22 17:08:53
阅读次数:
179
常见的80x86 CPU是先存放小值,再存放大值。这是小端字节(Little endian)序列。
而数字在互联网上传输的时候,是大端字节序列(Big endian)。所以,网络编程里有一个api是htons(),用来将主机字节顺序转化成为网络字节顺序。
常见的CPU平台如下:
处理器
操作系统
字节顺序
Alpha...
分类:
其他好文 时间:
2014-06-22 16:32:56
阅读次数:
228
走进WAVE文件
WAVE是录音时用的标准的Windows文件格式,文件的扩展名为“wav”,数据本身的格式为PCM或压缩型,属于无损音乐格式的一种,符合RIFF(Resource
Interchange File Format)规范。所有的WAV都有一个文件头,这个文件头音频流的编码参数。数据块的记录方式是小端(little-endian)字节顺序,标志符并不是字符串而是单独的符号
表1...
分类:
系统相关 时间:
2014-06-22 16:18:11
阅读次数:
326
Convert Sorted List to Binary Search Tree
Total Accepted: 12283 Total
Submissions: 45910My Submissions
Given a singly linked list where elements are sorted in ascending order, convert it...
分类:
其他好文 时间:
2014-06-21 23:57:00
阅读次数:
351
5个核心的SQL语句1.SELECT-查询语句的逻辑处理顺序5 SELECT 1 FROM 1.1 FROM JOIN ON 2 WHERE 3 GROUP BY 4 HAVING 6 ORDER BY -FROM子句: 处理联结语句的顺序1、交叉联结,也称笛卡尔积;2、内联结;3、外联结。-GRO...
分类:
数据库 时间:
2014-06-21 17:40:51
阅读次数:
440