摘要:
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu... 阅读全文
摘要:
Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the e... 阅读全文
摘要:
Given two numbers represented as strings, return multiplication of the numbers as a string.Note: The numbers can be arbitrarily large and are non-nega... 阅读全文
摘要:
Given an unsorted integer array, find the first missing positive integer.For example,Given[1,2,0]return3,and[3,4,-1,1]return2.Your algorithm should ru... 阅读全文
摘要:
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
摘要:
Note:All numbers (including target) will be positive integers.Elements in a combination (a1,a2, … ,ak) must be in non-descending order. (ie,a1≤a2≤ … ≤... 阅读全文
摘要:
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw... 阅读全文
摘要:
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or... 阅读全文
摘要:
方法一:暴力搜索针对S中每个字符开始搜索一次长度为wordLen*len的字符串,是否包含L中的所有单词。这个很好统计,Map就可以直接搞定。思路很好想,同时也很费时。超时class Solution { map m_map; public: void initMap(ve... 阅读全文
摘要:
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.思路:用 divisor 右移,计算出最大的位数,然后不断比较 更新过的divi... 阅读全文