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 ...
分类:
其他好文 时间:
2019-03-24 10:02:12
阅读次数:
119
Given an array of integers, find the first missing positive integer in linear time and constant space. In other words, find the lowest positive intege ...
分类:
其他好文 时间:
2019-03-08 09:20:26
阅读次数:
120
"[Lintcode]61. Search for a Range" / "[Leetcode]34. Find First and Last Position of Element in Sorted Array" 本题难度: Medium/Medium Topic: Binary Search ...
分类:
其他好文 时间:
2019-02-10 09:22:00
阅读次数:
143
Given an array of integers nums sorted in ascending order, find the starting and ending position of a given target value. Your algorithm's runtime com ...
分类:
其他好文 时间:
2019-02-02 23:19:31
阅读次数:
208
https://leetcode.com/problems/first-unique-character-in-a-string/ Given a string, find the first non-repeating character in it and return it's index. ...
分类:
其他好文 时间:
2019-01-30 20:54:02
阅读次数:
119
本人编程小白,如果有写的不对、或者能更完善的地方请个位批评指正! 这个是leetcode的第34题,这道题的tag是数组,需要用到二分搜索法来解答 34. Find First and Last Position of Element in Sorted Array Given an array o ...
分类:
编程语言 时间:
2018-12-24 13:21:36
阅读次数:
277
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 ...
分类:
其他好文 时间:
2018-12-09 16:45:36
阅读次数:
158
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 ...
分类:
其他好文 时间:
2018-12-03 23:01:53
阅读次数:
165
1. 截取子串 2. 替换子串 3. 查找子串 一:find 函数原型: 参数说明:pos查找起始位置 n待查找字符串的前n个字符 使用样例: 上面定义出了两个字符串; 二:find_first_of 函数原型: 参数和find基本相同,不再赘述! 特别注意: find_first_of 函数最容易 ...
分类:
其他好文 时间:
2018-11-22 00:07:56
阅读次数:
191
这里强烈推荐一个博主写的二分搜索总结:http://www.cnblogs.com/grandyang/p/6854825.html 参考链接: https://leetcode.com/problems/find-first-and-last-position-of-element-in-sort ...
分类:
其他好文 时间:
2018-11-04 14:18:46
阅读次数:
241