码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
LeetCode 167. Two Sum II – Input array is sorted
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function ...
分类:其他好文   时间:2018-12-03 00:51:39    阅读次数:197
python中的sorted函数的用法
sorted函数可以直接用来对list进行升序排序,如果是数字则按由小到大排序,若是字符则按大写小于小写来排序。 除此之外,sorted还可以按指定的key方法进行排序,因此该函数亦是高阶函数。 比如令L=[1,-3,21,6,-43],则sorted(L,key=abs)=[1,-3,6,21,- ...
分类:编程语言   时间:2018-12-02 22:32:50    阅读次数:207
#Leetcode# 228. Summary Ranges
https://leetcode.com/problems/summary-ranges/ Given a sorted integer array without duplicates, return the summary of its ranges. Example 1: Example 2: ...
分类:其他好文   时间:2018-12-02 19:16:40    阅读次数:209
167. Two Sum II - Input array is sorted - Easy
Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number. The function ...
分类:其他好文   时间:2018-12-02 12:24:41    阅读次数:164
LeetCode:删除排序数组中的重复项 (Remove Duplicates from Sorted Array)
public class RemoveDuplicates { /** * 修改数组,使数组有序不重复。超出长度不考虑。 * @param 排序数组 * @return 数组不重复数的个数 */ public int removeDuplicates(int[] nums) { // 需要修改的元素... ...
分类:编程语言   时间:2018-12-01 23:42:20    阅读次数:224
Tree总结
树结构问题因为容易写出解法,因此经常出现在面试题中 1. 树的种类 1) Tree 2) Binary Trees 3) Binary Search Trees(BST) : used to sorted or ordered data. //解决方案:recursion 查找操作(fast and ...
分类:其他好文   时间:2018-12-01 18:40:43    阅读次数:191
Aizu ITP2_6_A(二分模板)
For a given sequence $A = \{a_0, a_1, ..., a_{n-1}\}$ which is sorted by ascending order, find a specific value $k$ given as a query. Input The input ...
分类:其他好文   时间:2018-12-01 15:33:09    阅读次数:211
Redis数据类型(上)
数据类型 1.string(字符串) 2.hash(哈希,类似java里的Map) 3.list(列表) 4.set(集合) 5.zset(sorted set:有序集合) 6.基数 String(字符串) string是redis最基本的类型,你可以理解成与Memcached一模一样的类型,一个k ...
分类:其他好文   时间:2018-12-01 00:46:54    阅读次数:225
C# 写 LeetCode easy #21 Merge Two Sorted Lists
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 th ...
分类:Windows程序   时间:2018-11-30 13:44:57    阅读次数:220
Spring Boot 2集成Redis
Redis是一个开源的使用ANSI C语言编写、支持网络、可基于内存亦可持久化的日志型、Key-Value数据库,并提供多种语言的API。 redis是一个key-value存储系统,支持存储的value类型包括string(字符串)、list(链表)、set(集合)、zset(sorted set... ...
分类:编程语言   时间:2018-11-29 15:38:26    阅读次数:187
5925条   上一页 1 ... 96 97 98 99 100 ... 593 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!