码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
codeforces297B
Fish Weight CodeForces - 297B It is known that there are k fish species in the polar ocean, numbered from 1 to k. They are sorted by non-decreasing or ...
分类:其他好文   时间:2019-05-02 23:10:36    阅读次数:151
python中list.sort()与sorted()的区别
list.sort()和sorted()都是python的内置函数,他们都用来对序列进行排序,区别在于 list.sort()是对列表就地(in place)排序,返回None;sorted()返回排好序的新列表,原列表不变 list.sort()只适用于列表,sorted()适用于任意可迭代对象 ...
分类:编程语言   时间:2019-05-02 21:30:44    阅读次数:138
[LeetCode] 21. Merge Two Sorted Lists_Easy tag: Linked List
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists. Example: ...
分类:其他好文   时间:2019-05-02 11:49:36    阅读次数:106
redis学习(三)
一、Redis 数据类型 Redis支持五种数据类型:string(字符串),hash(哈希),list(列表),set(集合)及zset(sorted set:有序集合)。 二、Redis 命令 1、Redis 命令用于在 redis 服务上执行操作。要在 redis 服务上执行命令需要一个 re ...
分类:其他好文   时间:2019-05-01 23:51:02    阅读次数:140
[LeetCode] Remove Duplicates from Sorted Array II
80. Given a sorted array nums, remove the duplicates in-place such that duplicates appeared at most twice and return the new length. Do not allocate e ...
分类:其他好文   时间:2019-05-01 18:34:11    阅读次数:149
【LeetCode每天一题】Remove Duplicates from Sorted List(移除有序链表中的重复数字)
Given a sorted linked list, delete all duplicates such that each element appear only once. Example 1: Example 2: ...
分类:其他好文   时间:2019-05-01 13:45:03    阅读次数:153
【LeetCode每天一题】 Remove Duplicates from Sorted List II(移除有序链表中重复的节点)
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only distinctnumbers from the original list. Example 1: Example 2: ...
分类:其他好文   时间:2019-05-01 13:21:13    阅读次数:123
167. Two Sum II - Input array is sorted两数之和
1. 原始题目 给定一个已按照升序排列 的有序数组,找到两个数使得它们相加之和等于目标数。 函数应该返回这两个下标值 index1 和 index2,其中 index1 必须小于 index2。 说明: 返回的下标值(index1 和 index2)不是从零开始的。 你可以假设每个输入只对应唯一的答 ...
分类:其他好文   时间:2019-05-01 12:11:26    阅读次数:140
33. 搜索旋转排序数组
https://leetcode-cn.com/problems/search-in-rotated-sorted-array/submissions/ 有序 查找 往二分查找上靠 虽然该数组被旋转导致整体无序,但从中间截断后至少有一半仍然是有序的 注意等号 从mid处划分,至少有一半是有序的。如果 ...
分类:编程语言   时间:2019-04-30 23:54:50    阅读次数:255
skiplist(跳表)的原理及JAVA实现
前记 最近在看Redis,之间就尝试用sortedSet用在实现排行榜的项目,那么sortedSet底层是什么结构呢? "Redis sorted set的内部使用HashMap和跳跃表(SkipList)来保证数据的存储和有序,HashMap里放的是成员到score的映射,而跳跃表里存放的是所有的 ...
分类:编程语言   时间:2019-04-30 23:47:31    阅读次数:309
5925条   上一页 1 ... 68 69 70 71 72 ... 593 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!