码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
redis实现音乐排行榜功能
sorted_set类型 新的存储需求:数据排序有利于数据的有效展示,需要提供一种可以根据自身特征进行排序的方式 需要的存储结构:新的存储模型,可以保存可排序的数据 sorted_set类型:在set的存储结构基础上添加可排序字段 基本操作 添加数据 获取全部数据 删除数据 按条件获取数据 条件删除 ...
分类:其他好文   时间:2020-02-13 21:08:03    阅读次数:84
21. Merge Two Sorted Lists
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: ...
分类:其他好文   时间:2020-02-13 20:46:21    阅读次数:72
[LC] 373. Find K Pairs with Smallest Sums
You are given two integer arrays nums1 and nums2 sorted in ascending order and an integer k. Define a pair (u,v) which consists of one element from th ...
分类:其他好文   时间:2020-02-13 13:22:48    阅读次数:67
LeetCode | 0088. Merge Sorted Array合并两个有序数组【Python】
LeetCode 0088. Merge Sorted Array合并两个有序数组【Easy】【Python】【双指针】 题目 "英文题目链接" Given two sorted integer arrays nums1 and nums2 , merge nums2 into nums1 as o ...
分类:编程语言   时间:2020-02-12 23:50:19    阅读次数:89
POJ1094 Sorting It All Out
An ascending sorted sequence of distinct values is one in which some form of a less-than operator is used to order the elements from smallest to large ...
分类:其他好文   时间:2020-02-12 18:29:23    阅读次数:62
leetcode 4 Median of Two Sorted Arrays
这道题要求两个有序数组,找出中间位置的平均值; 解题思路: 1、取A数组的中间位置mid的值key,去B数组中查找最靠近key且小于等于key的位置index; 2、将原数组切成三段,index和mid之前数组的为新的left数组;right1跟right2为新的right数组;mid到right1 ...
分类:其他好文   时间:2020-02-12 12:51:16    阅读次数:52
LeetCode | 0167: Two Sum II - Input array is sorted【Python】
LeetCode 0167: Two Sum II Input array is sorted【Python】 题目 "英文题目链接" Given an array of integers that is already sorted in ascending order\ , find two n ...
分类:编程语言   时间:2020-02-12 00:19:27    阅读次数:74
[LeetCode] 109. Convert Sorted List to Binary Search Tree
将有序链表转化为二叉搜索树。题目即是题意,跟[LeetCode] 108. Convert Sorted Array to Binary Search Tree可以一起做。108是从有序数组转化成BST,109是从有序链表转化成BST。区别在于108可以通过找中点的办法快速找到根节点,但是109只能 ...
分类:其他好文   时间:2020-02-11 10:10:48    阅读次数:71
[LeetCode] 108. Convert Sorted Array to Binary Search Tree
将有序数组转化为二叉搜索树。题目即是题意。只要输出一个有效的BST即可。此题可以跟109题一起做,要求很接近但是做法不太一样。例子, Example: Given the sorted linked list: [-10,-3,0,5,9], One possible answer is: [0,- ...
分类:其他好文   时间:2020-02-11 09:53:31    阅读次数:59
RedisTemplate常用方法总结
Redis常用的数据类型: String Hash List Set zSet Sorted set String类型 判断是否有key所对应的值,有则返回true,没有则返回false redisTemplate.hasKey(key) 有则取出key值所对应的值 redisTemplate.op ...
分类:其他好文   时间:2020-02-10 22:14:54    阅读次数:1080
5925条   上一页 1 ... 29 30 31 32 33 ... 593 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!