码迷,mamicode.com
首页 >  
搜索关键字:should be repaired    ( 4956个结果
Problem LRU Cache
Problem Description:Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.ge...
分类:其他好文   时间:2014-07-07 16:41:12    阅读次数:237
leetcode - Merge Two Sorted Lists
题目:Merge Two Sorted ListsMerge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the ...
分类:其他好文   时间:2014-07-07 14:06:19    阅读次数:221
Two Sum
Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two nu...
分类:其他好文   时间:2014-06-30 21:36:50    阅读次数:292
Single Number
题目 Given an array of integers, every element appears twice except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it witho...
分类:其他好文   时间:2014-06-30 19:38:37    阅读次数:226
Single Number II
题目 Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it...
分类:其他好文   时间:2014-06-30 19:23:18    阅读次数:200
Flatten Binary Tree to Linked List
题目 Given a binary tree, flatten it to a linked list in-place. For example, Given 1 / 2 5 / \ 3 4 6 The flattened tree should look lik...
分类:其他好文   时间:2014-06-30 18:13:31    阅读次数:229
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 O(log (m+n)). 方法 转换为寻找第k大的数。 ...
分类:其他好文   时间:2014-06-30 06:05:58    阅读次数:261
Text Justification
题目 Given an array of words and a length L, format the text such that each line has exactly L characters and is fully (left and right) justified. You should pack your words in a greedy approa...
分类:其他好文   时间:2014-06-29 23:44:02    阅读次数:357
leetCode: Single Number II [137]
【题目】 Given an array of integers, every element appears three times except for one. Find that single one. Note: Your algorithm should have a linear runtime complexity. Could you implement it without using extra memory? 【题意】 给定一个整数以外,其中除了一个整数只出现一次以外...
分类:其他好文   时间:2014-06-29 22:52:35    阅读次数:246
LeetCode: LRU Cache [146]
【题目】 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 the key exists in the cache, otherwise return -1. se...
分类:其他好文   时间:2014-06-29 22:45:26    阅读次数:358
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!