
Map
JohnWill_
小白一个,慢慢成长....
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
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 concatenation of each word in L exactly once and wit...原创 2018-04-17 20:17:40 · 225 阅读 · 0 评论 -
Implement strStr() 实现strStr()函数
题目描述Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack. 这道题让我们在一个字符串中找另一个字符串第一次出现的位置,那我们首先要做一些判断,如果子字符串为空,则返回0,如果子字符串长度大...原创 2018-04-17 22:52:06 · 550 阅读 · 0 评论 -
two-sum
题目描述Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target...原创 2018-04-19 16:12:38 · 102 阅读 · 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 O(log (m+n)). 解题思路:将两个有序数组合并为一个,设置一个 map<...原创 2018-04-19 20:01:19 · 121 阅读 · 0 评论