码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
LC 955. Delete Columns to Make Sorted II
We are given an array A of N lowercase letter strings, all of the same length. Now, we may choose any set of deletion indices, and for each string, we ...
分类:其他好文   时间:2019-02-04 18:09:31    阅读次数:202
redis的数据结构与命令
redis提供五种数据类型:string,hash,list,set及zset(sorted set)。 Redis数据就是以key­ value形式来存储的,key只能是字符串类型,value可以是以下五种类型:String、List、 Set、Sorted­Sets、Hash Redis数据就是 ...
分类:其他好文   时间:2019-02-04 16:51:15    阅读次数:187
【leetcode】986. Interval List Intersections
题目如下: Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order. Return the intersection of these two inter ...
分类:其他好文   时间:2019-02-03 23:36:11    阅读次数:269
LC 986. Interval List Intersections
Given two lists of closed intervals, each list of intervals is pairwise disjoint and in sorted order. Return the intersection of these two interval li ...
分类:其他好文   时间:2019-02-03 15:37:00    阅读次数:145
19.2.3 [LeetCode 35]
Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or ...
分类:其他好文   时间:2019-02-03 12:40:25    阅读次数:160
Leetcode 35. Search in rotated sorted array
今天做了Leetcode第35题,总结一下这个题以及非常重要的一个考点:二分法 二分法: 二分法的核心思想是每次把范围缩小一半,时间复杂度为O(logn)。当brute force求解之后的时间复杂度是O(n),但是面试官还要求优化的时候就要考虑二分法了,因为比O(n)还要好的就是O(logn)了, ...
分类:其他好文   时间:2019-02-03 11:08:58    阅读次数:174
LeetCode-109-Convert Sorted List to Binary Search Tree
算法描述: Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST. For this problem, a height-balance ...
分类:其他好文   时间:2019-02-03 11:05:02    阅读次数:142
19.2.2 [LeetCode 33] Search in Rotated Sorted Array
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]). Y ...
分类:其他好文   时间:2019-02-02 23:28:15    阅读次数:198
19.2.2 [LeetCode 34] Find First and Last Position of Element in Sorted Array
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
Remove Duplicates from Sorted Array - LeetCode
[toc] 题目链接 "Remove Duplicates from Sorted Array LeetCode" 注意点 解法二要考虑输入为空的情况 解法 解法一:只要两行!超级简单,使用了 "unique函数" 。时间复杂度为O(n) 解法二:来自官方题解。维护两个指针,i是慢指针,j是快指针。 ...
分类:其他好文   时间:2019-02-02 14:29:11    阅读次数:173
5925条   上一页 1 ... 82 83 84 85 86 ... 593 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!