![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
算法
一梦喂马.
这个作者很懒,什么都没留下…
展开
-
每天一道算法题:31. 下一个排列(Next Permutation)
01 问题描述 Implement next 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 pos...原创 2019-07-10 12:40:24 · 168 阅读 · 0 评论 -
每天一道算法题:33. 搜索旋转排序数组(Search in Rotated Sorted Array)
01 问题描述 Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand. (i.e., [0,1,2,4,5,6,7] might become [4,5,6,7,0,1,2]). You are given a target value to search. If ...原创 2019-07-10 13:19:53 · 207 阅读 · 0 评论 -
每天一道算法题:34. 在排序数组中查找元素的第一个和最后一个位置(Find First and Last Position of Element in Sorted Array)
1 问题 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 complexity must be in the order of O(log n). If ...原创 2019-07-11 00:14:10 · 196 阅读 · 0 评论