码迷,mamicode.com
首页 >  
搜索关键字:sorted    ( 5925个结果
Android使用adb获得activity堆栈信息
非常有用的命令: adb shell dumpsys activity 该命令可以看到当前运行的是哪个activity,运行的一些进程等 首先可以看到运行的进程:ACTIVITY MANAGER RUNNING PROCESSES (dumpsys activity processes) Process LRU list (sorted by oom_adj, 43 total,...
分类:移动开发   时间:2014-10-20 17:25:59    阅读次数:426
Find Minimum in Rotated Sorted Array
leetcode上的一道题 题意大致是:给定一个循环移位后的排序数组,求数组的最小值 抛开假设不谈,实际上就是一个求数组最小值的问题,可以o(n)扫一遍记录最小值;也相当于求[0,vec.size()-1]的区间最小值问题,可以转化成线段树树状数组处理 本问题的假设可以利用:数组是“片段”有序的,可...
分类:其他好文   时间:2014-10-20 14:56:04    阅读次数:143
Windows下Redis的安装使用
摘要redis是一个key-value存储系统。和Memcached类似,它支持存储的value类型相对更多,包括string(字符串)、list(链表)、set(集合)、zset(sorted set --有序集合)和hash(哈希类型)。这些数据类型都支持push/pop、add/remove及...
分类:Windows程序   时间:2014-10-20 13:16:10    阅读次数:324
【LeetCode】Find Minimum in Rotated Sorted Array 解题报告
【题目】 Suppose a sorted array 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). Find the minimum element. You may assume no duplicate...
分类:其他好文   时间:2014-10-20 11:51:28    阅读次数:239
Convert Sorted List to Binary Search Tree
[leetcode]Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:其他好文   时间:2014-10-20 11:49:53    阅读次数:114
LeetCode-Remove Duplicates from Sorted Array-从有序数组移除重复-简单逻辑
https://oj.leetcode.com/problems/remove-duplicates-from-sorted-array/用一个cnt记录不重复的部分,后面每遇到不重复的cnt++即可。class Solution {public: int removeDuplicates(i...
分类:编程语言   时间:2014-10-20 03:23:10    阅读次数:241
leetcode第22题--Merge k Sorted Lists
problem:Mergeksorted linked lists and return it as one sorted list. Analyze and describe its complexity.先合并两个list,再根据归并排序的方法递归合并。假设总共有k个list,每个list的最大...
分类:其他好文   时间:2014-10-20 02:00:03    阅读次数:197
Median of Two Sorted Arrays
There are two sorted arrays A and B of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be ...
分类:其他好文   时间:2014-10-19 18:18:19    阅读次数:188
Leetcode | Find Minimum in Rotated Sorted Array
Suppose a sorted array 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).Find the minimum element.Yo...
分类:其他好文   时间:2014-10-19 16:56:55    阅读次数:192
Python中的sorted函数以及operator.itemgetter函数
operator.itemgetter函数operator模块提供的itemgetter函数用于获取对象的哪些维的数据,参数为一些序号(即需要获取的数据在对象中的序号),下面看例子。a = [1,2,3]>>> b=operator.itemgetter(1) //定义函数b,获取对象的第1个域.....
分类:编程语言   时间:2014-10-19 09:01:14    阅读次数:183
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!