码迷,mamicode.com
首页 >  
搜索关键字:should    ( 4948个结果
[leetcode] Two Sum
Two SumGiven 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...
分类:其他好文   时间:2014-12-28 11:38:19    阅读次数:134
LintCode-Subarray Sum
Given an integer array, find a subarray where the sum of numbers is zero. Your code should return the index of the first number and the index of the l...
分类:其他好文   时间:2014-12-27 23:00:42    阅读次数:421
[LeetCode]95.Unique Binary Search Trees II
【题目】 Given n, generate all structurally unique BST's (binary search trees) that store values 1...n. For example, Given n = 3, your program should return all 5 unique BST's shown below. 1 ...
分类:其他好文   时间:2014-12-27 16:11:53    阅读次数:109
LintCode-Rehashing
The size of the hash table is not determinate at the very beginning. If the total size of keys is too large (e.g. size >= capacity / 10), we should do...
分类:其他好文   时间:2014-12-27 06:43:00    阅读次数:359
leetcode 【 Merge Two Sorted Lists 】 python 实现
题目: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.代码:oj在...
分类:编程语言   时间:2014-12-26 16:08:31    阅读次数:205
leetcode Linked List Swap Nodes in Pairs python 实现
题目:Swap Nodes in PairsGiven a linked list, swap every two adjacent nodes and return its head.For example,Given1->2->3->4, you should return the list a...
分类:编程语言   时间:2014-12-26 14:27:01    阅读次数:205
LeetCode:Spiral Matrix II
题目描述: Given an integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. For example, Given n = 3, You should return the following matrix: [ [ 1, 2, 3 ], [ 8,...
分类:其他好文   时间:2014-12-26 13:03:53    阅读次数:169
11Communicating with Other Fragments(Fragment之间的通信)
In order to reuse the Fragment UI components, you should build each as a completely self-contained, modular component that defines its own layout and behavior. Once you have defined these reusable Fra...
分类:其他好文   时间:2014-12-26 09:45:18    阅读次数:210
leetcode之找光棍数
题目: 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 without ...
分类:其他好文   时间:2014-12-25 23:43:28    阅读次数:450
leetcode之数组中找两数和为指定值
题目: 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 numbers such that they add up to the ta...
分类:编程语言   时间:2014-12-25 23:41:10    阅读次数:255
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!