leetcode--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 concaten...

2018-03-02 17:56:58

阅读数:37

评论数:0

leetcode---string-to-integer-atoi---字符串

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 bel...

2018-02-19 19:20:00

阅读数:33

评论数:0

leetcode---zigzag-conversion---字符串

class Solution { public: string convert(string s, int nRows) { if(nRows <= 1) return s; int n = s.length(); ...

2017-12-16 22:14:59

阅读数:71

评论数:0

leetcode---roman-to-integer---字符串

Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999.class Solution { public: int romanToI...

2017-11-30 23:46:39

阅读数:77

评论数:0

leetcode---implement-strstr---字符串

Implement strStr(). Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.class Solution { publ...

2017-11-23 20:11:55

阅读数:85

评论数:0

leetcode---multiply-strings---字符串

Given two numbers represented as strings, return multiplication of the numbers as a string. Note: The numbers can be arbitrarily large and are non-n...

2017-11-22 19:20:24

阅读数:87

评论数:0

leetcode---wildcard-matching---字符串,dp

Implement wildcard pattern matching with support for’?’and’*’. ‘?’ Matches any single character. ‘*’ Matches any sequence of characters (including ...

2017-11-21 18:22:24

阅读数:130

评论数:0

leetcode---regular-expression-matching---字符串

Implement regular expression matching with support for’.’and’*’. ‘.’ Matches any single character. ‘*’ Matches zero or more of the preceding eleme...

2017-11-20 19:56:59

阅读数:90

评论数:0

leetcode---add-binary---字符串

Given two binary strings, return their sum (also a binary string). For example, a =”11” b =”1” Return”100”.class Solution { public: int atoi(c...

2017-11-14 18:30:49

阅读数:89

评论数:0

leetcode---anagrams---字符串

Given an array of strings, return all groups of strings that are anagrams. Note: All inputs will be in lower-case.class Solution { public: vecto...

2017-11-14 18:11:24

阅读数:90

评论数:0

leetcode---length-of-last-word---字符串

Given a string s consists of upper/lower-case alphabets and empty space characters’ ‘, return the length of last word in the string. If the last wor...

2017-11-14 18:10:30

阅读数:82

评论数:0

leetcode---count-and-say---字符串

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 ...

2017-11-06 19:14:58

阅读数:127

评论数:0

leetcode---longest-palindromic-substring---字符串

Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longe...

2017-11-05 19:40:45

阅读数:89

评论数:0

leetcode---longest-substring-without-repeating-characters---字符串

Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters f...

2017-11-05 18:36:26

阅读数:76

评论数:0

leetcode---Fizz Buzz

Write a program that outputs the string representation of numbers from 1 to n.But for multiples of three it should output “Fizz” instead of the numbe...

2017-04-26 21:33:10

阅读数:211

评论数:0

leetcode---Add Strings

Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.Note:The length of both num1 and num2 is < 51...

2017-04-14 08:44:49

阅读数:514

评论数:0

leetcode--- Bulls and Cows---字符串

You are playing the following Bulls and Cows game with your friend: You write down a number and ask your friend to guess what the number is. Each tim...

2017-03-02 14:33:25

阅读数:146

评论数:0

STL---string用法

#include "iostream" #include "vector" #include "string" #include "sstream"using namespace std;int main() { ...

2016-08-27 15:52:47

阅读数:454

评论数:0

leetcode---Reverse String

Write a function that takes a string as input and returns the string reversed.Example: Given s = “hello”, return “olleh”.class Solution { public: ...

2016-05-12 12:45:11

阅读数:185

评论数:0

KMP

输入 第一行一个整数N,表示测试数据组数。接下来的N*2行,每两行表示一个测试数据。在每一个测试数据中,第一行为模式串,由不超过10^4个大写字母组成,第二行为原串,由不超过10^6个大写字母组成。其中N<=20输出 对于每一个测试数据,按照它们在输入中出现的顺序输出一行Ans,表示模式...

2016-04-22 16:27:34

阅读数:211

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭