摘要: 转自:http://www.cnblogs.com/yangfeng/archive/2009/07/25/1530962.htmla:link,a:visited,a:hover,a:active1:解释link:连接平常的状态visited:连接被访问过之后hover:鼠标放到连接上的时候act... 阅读全文
posted @ 2015-04-10 10:09 hongchun_z 阅读(173) 评论(0) 推荐(0) 编辑
摘要: 引用:http://www.czhphp.com/archives/252如何将 memcached 融入到您的环境中?在开始安装和使用 using memcached 之前,我们需要了解如何将 memcached 融入到您的环境中。虽然在任何地方都可以使用 memcached,但我发现需要在数据库... 阅读全文
posted @ 2015-03-30 19:31 hongchun_z 阅读(161) 评论(0) 推荐(0) 编辑
摘要: Reverse digits of an integer. Example1: x = 123, return 321Example2: x = -123, return -321这个题目的难度在于处理溢出先贴出正确运行的代码:int reverse(int x) { if(x == 0) r... 阅读全文
posted @ 2015-03-30 09:05 hongchun_z 阅读(174) 评论(0) 推荐(0) 编辑
摘要: Implement atoi to convert a string to an integer.Hint: Carefully consider all possible input cases. If you want a challenge, please do not see below a... 阅读全文
posted @ 2015-03-27 10:27 hongchun_z 阅读(94) 评论(0) 推荐(0) 编辑
摘要: Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.每次对比最高位和最低位bool isPalindrome(int x) { if(x = 10) base = ... 阅读全文
posted @ 2015-03-27 09:38 hongchun_z 阅读(101) 评论(0) 推荐(0) 编辑
摘要: C++中map容器提供一个键值对容器,map与multimap差别仅仅在于multiple允许一个键对应多个值。map是一类关联式容器。它的特点是增加和删除节点对迭代器的影响很小,除了那个操作节点,对其他的节点都没有什么影响。对于迭代器来说,可以修改实值,而不能修改key。map的功能自动建立Key... 阅读全文
posted @ 2015-03-27 09:21 hongchun_z 阅读(222) 评论(0) 推荐(0) 编辑
摘要: Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removi... 阅读全文
posted @ 2015-03-26 21:09 hongchun_z 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid.The brackets must close in the c... 阅读全文
posted @ 2015-03-24 19:39 hongchun_z 阅读(116) 评论(0) 推荐(0) 编辑
摘要: Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length.Do not allocate extra space for... 阅读全文
posted @ 2015-03-24 17:39 hongchun_z 阅读(84) 评论(0) 推荐(0) 编辑
摘要: mplement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.int strStr(char *haystack, ... 阅读全文
posted @ 2015-03-24 16:01 hongchun_z 阅读(93) 评论(0) 推荐(0) 编辑