摘要: 题目: Given a positive integer, return its corresponding column title as appear in an Excel sheet. For example: 1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB 代码: cla... 阅读全文
posted @ 2016-04-17 16:06 Quincy 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 题目说明: Write a function to find the longest common prefix string amongst an array of strings. 程序代码: #include using namespace std; string longestCommonPrefix1(vector& strs) { int nMinLength... 阅读全文
posted @ 2016-03-24 15:39 Quincy 阅读(346) 评论(0) 推荐(0) 编辑
摘要: 题目说明: Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 程序代码: #include using namespace std; //{'I','V','X','L','C','D','M','#','#'};... 阅读全文
posted @ 2016-03-24 14:43 Quincy 阅读(255) 评论(0) 推荐(0) 编辑
摘要: 题目说明: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 程序代码: 思路是把数字拆成单独的部分,最后拼接起来 1. 拆分数字,求出每一位数字。 2. 把每位数字单独转换singleDigitToRoman成罗马数字,... 阅读全文
posted @ 2016-03-24 11:04 Quincy 阅读(272) 评论(0) 推荐(0) 编辑
摘要: Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes? 阅读全文
posted @ 2016-03-20 19:15 Quincy 阅读(176) 评论(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 and ask yourself what are the possible input... 阅读全文
posted @ 2016-03-18 18:16 Quincy 阅读(420) 评论(0) 推荐(0) 编辑
摘要: 题目说明: Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return –321 程序代码: #include using namespace std; int reverse2(int x) { int result[20] = {0}; ... 阅读全文
posted @ 2016-03-17 23:34 Quincy 阅读(352) 评论(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 font for better legibility) P A H N A P ... 阅读全文
posted @ 2016-03-17 22:49 Quincy 阅读(985) 评论(0) 推荐(0) 编辑
摘要: 概述: 由于需要使用DDE方式打开文件,所以把支持DDE方式打开文件的参数都导出来到文件,方便查找。 并且提供运行DDE命令的工具,可以用于测试DDE功能。 1、运行脚步GetDDE.vbs可以获取系统中DDE消息参数,如下 .dwi dwifile open D:\WinDDK\760016~1.1\tools\Other\i386\Depends.exe /dde ... 阅读全文
posted @ 2016-03-11 17:57 Quincy 阅读(1353) 评论(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 single digit. Add the two numbers and return it as ... 阅读全文
posted @ 2016-02-24 15:00 Quincy 阅读(248) 评论(0) 推荐(0) 编辑