Reverse a linked list from position m to n. Do it in-place and in one-pass.For example:Given 1->2->3->4->5->NULL, m = 2 and n = 4,return 1->4->3->2->5...
分类:
其他好文 时间:
2014-06-26 23:07:29
阅读次数:
276
class Solution {public: int reverse(int x) { bool neg = x < 0; long long num = x; if (neg) num = -num; long long out = ...
分类:
其他好文 时间:
2014-06-25 18:24:01
阅读次数:
280
Given a linked list and a value x, partition it such that all nodes less than x come before nodes greater than or equal to x.You should preserve the o...
分类:
其他好文 时间:
2014-06-25 12:14:23
阅读次数:
159
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-06-25 11:10:16
阅读次数:
163
第一章 TCP/IP协议族
1.1 TCP/IP协议族体系结构以及主要协议
1.1.1数据链路层
数据链路层实现了网卡接口的网络驱动程序,以处理数据在物理媒介上的传输。
数据链路层两个常用的协议是ARP(AddressResolve Protocol,地址解析协议)和RARP(Reverse Address Resolve Prot...
分类:
其他好文 时间:
2014-06-25 10:26:52
阅读次数:
280
关于STL容器,最了不起的一点是,它们会自动增长以便容纳下你放入其中的数据,只要没有超出它们的最大限制就可以。对于vector和string,增长过程是这样来实现的:每当需要更多空间时,就调用与realloc类似的操作。这一类似于realloc的操作分为4部分:
分配一块大小为当前容量的某个倍数的新内存。在大多数实现中,vector和string的容量每次以2的...
分类:
其他好文 时间:
2014-06-25 08:40:21
阅读次数:
287
1. 在Sql server数据库中创建数据库的模型图 -- Database Diagrams
2. 控制面板--管理工具--ODBC数据源链接--创建一个Sql server的数据源链接
3. 打开Visio工具,打开数据库模型--Database--Reverse Engineer[反向工程]
选择要导入到Visio中的表:
4. 将DB的表结构导入到Visio中,界...
分类:
数据库 时间:
2014-06-25 07:44:55
阅读次数:
224
题目
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return...
分类:
其他好文 时间:
2014-06-24 21:46:24
阅读次数:
249
【问题】
Given an input string, reverse the string word by word.
For example,
Given s = "the sky is blue",
return "blue is sky the".
【代码】
class Solution:
# @param s, a string
# @retu...
分类:
其他好文 时间:
2014-06-24 21:00:30
阅读次数:
168
题目
Reverse digits of an integer.
Example1: x = 123, return 321
Example2: x = -123, return -321
Have you thought about this?
Here are some good questions to ask before coding. Bonus poin...
分类:
其他好文 时间:
2014-06-24 20:16:39
阅读次数:
180