- 博客(13)
- 资源 (3)
- 收藏
- 关注
原创 leetcode - Longest Common Prefix
求最长前缀 #include #include #include using namespace std; class Solution { public: string longestCommonPrefix(vector& strs) { int i=0; int index=0; int lenth
2015-05-27 22:31:53 430
原创 leetcode - Integer to Roman 与 Roman to Integer
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. #include #include using namespace std; class Solution { public: string int
2015-05-27 15:13:45 444
原创 leetcode - Container With Most Water
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 endpoints of line i is at (i, ai) and (i, 0). Find two
2015-05-27 14:28:17 475
转载 leetcode - Regular Expression Matching
Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the preceding element. The matching should cover the entire input st
2015-05-23 11:13:45 455
原创 leetcode - Palindrome Number
Determine whether an integer is a palindrome. Do this without extra space. #include #include #include using namespace std; class Solution { public: bool isPalindrome(int x) {
2015-05-19 22:41:01 813
原创 leetcode - String to Integer (atoi)
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 ca
2015-05-19 20:27:53 422
原创 leetcode - Reverse Integer
Reverse digits of an integer. Example1: x = 123, return 321 Example2: x = -123, return -321 class Solution { public: int reverse(int x) { char flag=0; int va
2015-05-18 21:52:33 396
转载 leetcode - ZigZag Conversion
转自:http://www.cnblogs.com/sanghai/p/3632528.html 题目: 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
2015-05-17 23:07:52 430
转载 leetcode-Longest Palindromic Substring
转自:http://www.cnblogs.com/TenosDoIt/p/3675788.html?utm_source=tuicool LeetCode:Longest Palindromic Substring 最长回文子串 题目链接 Given a string S, find the longest palindromic substring in S. You
2015-05-12 22:37:06 604
转载 nodejs学习:express的静态、动态视图助手
转自:前端博客http://qianduanblog.com/post/nodejs-learning-11-express-static-and-dynamic-helper.html 1、引子 express的视图助手可以全局控制整个app的视图变量、方法,比如每个模板都需要引入app的名称和输出请求地址: // /view/1app.get("/view/1", functio
2015-05-07 15:38:00 1701
转载 nodejs学习:express本地、响应全局变量
转自:http://qianduanblog.com/post/nodejs-learning-9-express-local-response-variable.html 在做应用程序、Web程序等,都需要事先配置全局变量,而不是将程序编写为硬编码。本地全局变量,指的是被多处重复使用的的变量,一般类指静态常量,如网站的名称、地址、描述、作者等信息;而响应全局变量,指的是被多处重复使用动态变
2015-05-07 15:29:06 10111
转载 Leetcode-median of two sorted arrays
转自:http://blog.csdn.net/yutianzuijin/article/details/11499917/ 这是我做的第二个leetcode题目,一开始以为和第一个一样很简单,但是做的过程中才发现这个题目非常难,给人一种“刚上战场就踩上地雷挂掉了”的感觉。后来搜了一下leetcode的难度分布表(leetcode难度及面试频率)才发现,该问题是难度为5的问题,真是小看了
2015-05-06 22:44:18 551
原创 Leetcode- Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo
2015-05-05 21:49:32 459
iNodeClient_Linux(32/64)
2015-11-20
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人