码迷,mamicode.com
首页 >  
搜索关键字:implement strstr    ( 2381个结果
Reverse Linked List****
Reverse a singly linked list.click to show more hints.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?分...
分类:其他好文   时间:2015-05-09 01:13:01    阅读次数:176
Implement Trie (Prefix Tree)
Implement a trie with insert, search, and startsWith methods.Note: You may assume that all inputs are consist of lowercase letters a-z.思路: 之前也没有接触过Trie,百科上查了一下,大概就是词源的问题,N个word有公共前缀,只是后缀不同,可以用树表示。 可...
分类:其他好文   时间:2015-05-08 22:05:17    阅读次数:158
[Leetcode] Implement Trie (Prefix Tree)
Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.实现字典树,没啥好说的。 1 class ...
分类:其他好文   时间:2015-05-08 19:54:37    阅读次数:101
Implement Trie (Prefix Tree)
Implement a trie withinsert,search, andstartsWithmethods.Note:You may assume that all inputs are consist of lowercase lettersa-z.由于用的是 26位字母的array, 所以...
分类:其他好文   时间:2015-05-08 14:26:09    阅读次数:101
leetcode-Single Number
题目描述: Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it withou...
分类:其他好文   时间:2015-05-08 13:09:35    阅读次数:112
LeetCode 10 Regular Expression Matching (C,C++,Java,Python)
Problem: 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 e...
分类:编程语言   时间:2015-05-07 22:08:33    阅读次数:331
LeetCode 28 Implement strStr() 找到字串返回位置。
题目: Implement strStr(). Returns the index of the first occurrence of needle in haystack, or -1 if needle is not part of haystack. 翻译: 找到字符串的子串位置,并返回。如果没有则返回-1 思路: 通过最简单的BF遍历,如果不符合则指向下一个字符,...
分类:其他好文   时间:2015-05-07 18:57:09    阅读次数:131
Reverse Linked List
Reverse a singly linked list.click to show more hints.Hint:A linked list can be reversed either iteratively or recursively. Could you implement both?I...
分类:其他好文   时间:2015-05-07 14:20:03    阅读次数:121
LeetCode 8 String to Integer (atoi) (C,C++,Java,Python)
Problem: 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 pos...
分类:编程语言   时间:2015-05-07 12:35:08    阅读次数:181
【 Regular Expression Matching 】cpp
题目:Implement regular expression matching with support for'.'and'*'.'.' Matches any single character.'*' Matches zero or more of the preceding element....
分类:其他好文   时间:2015-05-07 12:10:52    阅读次数:98
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!