![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
叼着烟卷的仙人
热爱编程,我可以编程一辈子!
展开
-
Implement strStr().
题目要求Implement strStr().Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack.题解对于字符串查找问题,可使用双重 for 循环解决,效率更高的则为 KMP 算法。双重 for 循环的使用较有讲究,因为这里需要考...原创 2019-07-04 15:30:02 · 133 阅读 · 0 评论 -
Compare Strings
题目要求Compare two strings A and B, determine whether A contains all of the characters in B.The characters in string A and B are allUpper Caseletters.NoticeThe characters of B in A are not neces...原创 2019-07-04 16:03:39 · 106 阅读 · 0 评论 -
Group Anagrams
题目要求Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return:[ ["ate", "eat","tea"], ["nat","tan"], ["bat"]]Note:All i...原创 2019-07-04 18:57:33 · 160 阅读 · 0 评论 -
组合数之和1
2019秋招-小红书编程题1本题本源leetcode39题,只不过要处理输入: 10 [2,3,5] 输出 4 (说明满足条件的组合数有4个,分别是[2,2,2,2,2] ,[2,3,5],[5,5],[2,2,3,3])题目描述:给定一个无重复元素的数组candidates和一个目标数target,找出candidates中所有可以使数字和为target的组合。...原创 2019-08-18 20:39:43 · 283 阅读 · 0 评论 -
2019秋招米哈游程序类B卷编程题
1.连续组合数字#include<iostream>#include<vector>using namespace std;int main() { int n; cin >> n; int count = 0; int m = n; vector<int> data(n); vector<int> set(n,0...原创 2019-10-10 21:15:18 · 2416 阅读 · 0 评论