码迷,mamicode.com
首页 >  
搜索关键字:least    ( 1796个结果
hbmy周赛1--A
Age Sort You are given the ages (in years) of all people of a country with at least 1 year of age. You know thatno individual in that country lives for 100 or more years. Now, you are given a very si...
分类:其他好文   时间:2015-06-07 13:56:36    阅读次数:110
LRU Cache -- leetcode
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the value (will always be positive) of the key if ...
分类:系统相关   时间:2015-06-07 11:10:42    阅读次数:144
[LeetCode] Contains Duplicate(II,III)
Contains DuplicateGiven an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if...
分类:其他好文   时间:2015-06-06 18:15:25    阅读次数:494
LRU算法的Python实现
LRU:least recently used,最近最少使用算法。在计算机的二级缓存,以及内存页面的置换,还有Redis缓存系统中都用到了该算法。我在两次面试时,都遇到过这个问题。 LRU的算法是比较简单的,当对key进行访问时(一般有查询,更新,增加,在get()和set()两个方法中实现即...
分类:编程语言   时间:2015-06-05 21:07:54    阅读次数:166
Java for LeetCode 152 Maximum Product Subarray
Find the contiguous subarray within an array (containing at least one number) which has the largest product. For example, given the array [2,3,-2,4],t...
分类:编程语言   时间:2015-06-05 13:35:21    阅读次数:133
Java for LeetCode 146 LRU Cache 【HARD】
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set. get(key) - Get the...
分类:编程语言   时间:2015-06-04 22:26:19    阅读次数:202
Contains Duplicate
//Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the a...
分类:其他好文   时间:2015-06-02 13:17:34    阅读次数:139
leetcode_Contains Duplicate_easy
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is...
分类:其他好文   时间:2015-06-01 09:39:41    阅读次数:96
LeetCode Contains Duplicate
Given an array of integers, find if the array contains any duplicates. Your function should return true if any value appears at least twice in the array, and it should return false if every element is...
分类:其他好文   时间:2015-05-31 12:26:15    阅读次数:130
Least Common Multiple
Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 37737    Accepted Submission(s): 14199 Problem Description The least common multiple (LC...
分类:其他好文   时间:2015-05-31 09:20:25    阅读次数:129
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!