Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Given a string, find the first non ...
分类:
其他好文 时间:
2017-06-23 10:17:03
阅读次数:
132
Given an unsorted integer array, find the first missing positive integer.For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm sh ...
分类:
其他好文 时间:
2017-06-20 10:53:31
阅读次数:
152
Given an unsorted integer array, find the first missing positive integer. For example,Given [1,2,0] return 3,and [3,4,-1,1] return 2. Your algorithm s ...
分类:
其他好文 时间:
2017-06-18 16:50:00
阅读次数:
154
https://leetcode.com/problems/first-unique-character-in-a-string/#/description Given a string, find the first non-repeating character in it and return ...
分类:
其他好文 时间:
2017-06-11 22:16:03
阅读次数:
139
https://leetcode.com/problems/first-missing-positive/#/description Given an unsorted integer array, find the first missing positive integer. For examp ...
分类:
其他好文 时间:
2017-06-11 13:39:40
阅读次数:
139
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: s = "leetcode" return 0. ...
分类:
其他好文 时间:
2017-06-11 10:11:16
阅读次数:
163
Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1. Examples: Note: You may assume the ...
分类:
其他好文 时间:
2017-06-09 00:52:12
阅读次数:
189
#include<iostream> #include<vector> using namespace std; /** * return: * -1:can not find; * positive:find the first position; */ int findPosition(vect ...
分类:
其他好文 时间:
2017-06-05 15:50:21
阅读次数:
156
//字符串分割函数 vector split(string str, string pattern){ vector ret; if (pattern.empty()) return ret; size_t start = 0, index = str.find_first_of(pattern, ... ...
分类:
其他好文 时间:
2017-06-04 13:54:22
阅读次数:
161
删除字符串首尾的空格: 记录: find_first_not_of(“ ”) // 从头开始寻找第一个不为“ ”的位置, 返回的是位置; find_last_not_of(" ") // 从末尾 开始寻找第一个不为“ ”的位置, 返回位置数; str1.erase(a,b) ; // 删除 a到b- ...
分类:
编程语言 时间:
2017-05-09 13:40:50
阅读次数:
159