03 2016 档案
摘要:题目说明: 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...
阅读全文
摘要:题目说明: 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','#','#'};...
阅读全文
摘要:题目说明: Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. 程序代码: 思路是把数字拆成单独的部分,最后拼接起来 1. 拆分数字,求出每一位数字。 2. 把每位数字单独转换singleDigitToRoman成罗马数字,...
阅读全文
摘要:Determine whether an integer is a palindrome. Do this without extra space. click to show spoilers. Some hints: Could negative integers be palindromes?
阅读全文
摘要:题目说明: 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...
阅读全文
摘要:题目说明: 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}; ...
阅读全文
摘要:题目说明: 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 ...
阅读全文
摘要:概述: 由于需要使用DDE方式打开文件,所以把支持DDE方式打开文件的参数都导出来到文件,方便查找。 并且提供运行DDE命令的工具,可以用于测试DDE功能。 1、运行脚步GetDDE.vbs可以获取系统中DDE消息参数,如下 .dwi dwifile open D:\WinDDK\760016~1.1\tools\Other\i386\Depends.exe /dde ...
阅读全文
浙公网安备 33010602011771号