![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
leetcode
Heliumfly
这个作者很懒,什么都没留下…
展开
-
Find First and Last Position of Element in Sorted Array(在排序数组中查找元素的第一个和最后一个位置)
Given an array of integersnumssorted in ascending order, find the starting and ending position of a giventargetvalue. Your algorithm's runtime complexity must be in the order ofO(logn). If the target is not found in the array, return[-1, -1]. Exa...原创 2020-05-10 22:05:56 · 300 阅读 · 0 评论 -
Longest Valid Parentheses(最长有效括号)
Given a string containing just the characters'('and')', find the length of the longest valid (well-formed) parentheses substring. Example 1: Input: "(()" Output: 2 Explanation: The longest valid parentheses substring is "()" Example 2: Input: ")()...原创 2020-05-08 18:15:14 · 237 阅读 · 0 评论 -
Next Permutation(下一个排列)
Implementnext permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possible o...原创 2020-05-08 15:49:19 · 158 阅读 · 0 评论