摘要:
题目描述:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two ... 阅读全文
posted @ 2015-02-05 10:37
Sawyer Ford
阅读(149)评论(0)推荐(0)
摘要:
题目描述:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding elemen... 阅读全文
posted @ 2015-02-02 10:36
Sawyer Ford
阅读(151)评论(0)推荐(0)
摘要:
题目描述: Determine whether an integer is a palindrome. Do this without extra space.solution1: //依次比较高位和低位数字是否相同bool isPalindrome(int x) { if(x... 阅读全文
posted @ 2015-01-16 10:05
Sawyer Ford
阅读(197)评论(0)推荐(0)
摘要:
最近在接触软件注册模块,需要获取硬盘序列号来生成注册码。 硬盘序列号,英文名:Hard Disk Serial Number,该号是硬盘厂家为区别产品而设置的,是唯一的。网上搜索一下,发现获取硬盘序列号的代码遍地都是,但很多是错误的。典型代表就是使用GetVolumeInformation函数获取序 阅读全文
posted @ 2015-01-12 18:58
Sawyer Ford
阅读(8660)评论(1)推荐(1)
摘要:
题目描述: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 be... 阅读全文
posted @ 2014-12-28 16:49
Sawyer Ford
阅读(161)评论(0)推荐(0)
摘要:
题目摘要:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321 这道题不算难,主要是要考虑"反转后的值可能越界"这一种情况。(此题起初设计时,未考虑这种情况,因此网上很多旧... 阅读全文
posted @ 2014-12-22 11:28
Sawyer Ford
阅读(145)评论(0)推荐(0)
摘要:
题目描述:The string "PAYPALISHIRING" is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed ... 阅读全文
posted @ 2014-12-19 19:54
Sawyer Ford
阅读(196)评论(0)推荐(0)
摘要:
题目描述:Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique l... 阅读全文
posted @ 2014-12-17 15:26
Sawyer Ford
阅读(206)评论(0)推荐(0)
摘要:
题目描述: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 si... 阅读全文
posted @ 2014-12-11 14:37
Sawyer Ford
阅读(183)评论(0)推荐(0)