上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页

Wildcard Matching

摘要: Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e... 阅读全文
posted @ 2014-10-22 22:38 Ryan-Xing 阅读(133) 评论(0) 推荐(0) 编辑

String to Integer (atoi)

摘要: Implementatoito convert a string to an integer.Hint:Carefully consider all possible input cases. If you want a challenge, please do not see below and ... 阅读全文
posted @ 2014-10-22 16:03 Ryan-Xing 阅读(128) 评论(0) 推荐(0) 编辑

Maximum Product Subarray

摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the... 阅读全文
posted @ 2014-10-22 14:01 Ryan-Xing 阅读(210) 评论(0) 推荐(0) 编辑

Decode Ways

摘要: A message containing letters fromA-Zis being encoded to numbers using the following mapping:'A' -> 1'B' -> 2...'Z' -> 26Given an encoded message conta... 阅读全文
posted @ 2014-10-22 12:15 Ryan-Xing 阅读(131) 评论(0) 推荐(0) 编辑

Divide Two Integers

摘要: Divide two integers without using multiplication, division and mod operator.分析:不能用乘、除、取模运算,我们可以用的运算还有加、减、位运算。一个比较简单的想法是在dividend上不断减去divisor,知道余数小于div... 阅读全文
posted @ 2014-10-20 19:52 Ryan-Xing 阅读(132) 评论(0) 推荐(0) 编辑

3Sum

摘要: Given an arraySofnintegers, are there elementsa,b,cinSsuch thata+b+c= 0? Find all unique triplets in the array which gives the sum of zero.Note:Elemen... 阅读全文
posted @ 2014-10-19 19:39 Ryan-Xing 阅读(124) 评论(0) 推荐(0) 编辑

Median of Two Sorted Arrays

摘要: There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ... 阅读全文
posted @ 2014-10-19 16:57 Ryan-Xing 阅读(140) 评论(0) 推荐(0) 编辑

Class

摘要: 1. No const constructorUnlike other member functions, constructors may not be declared as const . When we create a const object of a class type, the o... 阅读全文
posted @ 2014-10-14 16:14 Ryan-Xing 阅读(241) 评论(0) 推荐(0) 编辑

Substring with Concatenation of All Words

摘要: You are given a string,S, and a list of words,L, that are all of the same length. Find all starting indices of substring(s) in S that is a concatenati... 阅读全文
posted @ 2014-10-06 11:43 Ryan-Xing 阅读(204) 评论(0) 推荐(0) 编辑

Functions

摘要: 1 Local static variablesLocal static variables are not destroyed when the function ends; they are destroyed when the program terminates.2. Function pa... 阅读全文
posted @ 2014-10-04 21:43 Ryan-Xing 阅读(217) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 16 下一页