
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 · 354 阅读 · 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: 2Explanation: The longest valid parentheses substring is "()"Example 2:Input: ")()...原创 2020-05-08 18:15:14 · 296 阅读 · 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 · 208 阅读 · 0 评论