码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
Leetcode | 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 6The flattened t...
分类:其他好文   时间:2014-05-12 10:11:40    阅读次数:276
【LeetCode】Search 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 7might become4 5 6 7 0 1 2).You are given a target value t...
分类:其他好文   时间:2014-05-12 07:31:40    阅读次数:332
POJ 2079 凸包最大内接三角形
Triangle Time Limit: 3000MS   Memory Limit: 30000K Total Submissions: 8038   Accepted: 2375 Description Given n distinct points on a plane, your task is to find the triangl...
分类:其他好文   时间:2014-05-11 06:36:44    阅读次数:425
LeetCode--Search Insert Position
Search Insert Position  Total Accepted: 14091 Total Submissions: 41005My Submissions Given a sorted array and a target value, return the index if the target is found. If not, return the in...
分类:其他好文   时间:2014-05-11 05:53:03    阅读次数:241
Leetcode 树 Maximum Depth of Binary Tree
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Maximum Depth of Binary Tree  Total Accepted: 16605 Total Submissions: 38287 Given a binary tree, find its maximum depth. ...
分类:其他好文   时间:2014-05-11 01:58:31    阅读次数:441
Leetcode | Divide Two Integers
Divide two integers without using multiplication, division and mod operator.这道题要AC也不容易,许多基础概念不懂。最后看了答案,自己再做也很难AC。还是要记住一些关键点才行:1. 负数的补码等于反码+1.所以负数取绝对值就...
分类:其他好文   时间:2014-05-10 06:52:22    阅读次数:380
[leetcode]Single Number @ Python
原题地址:http://www.cnblogs.com/x1957/p/3373994.html题意:Given an array of integers, every element appearstwiceexcept for one. Find that single one.要求:线性时间复...
分类:编程语言   时间:2014-05-10 05:22:27    阅读次数:408
nylg 640 Geometric Sum
Geometric Sum时间限制:1000ms | 内存限制:65535KB难度:3描述Compute (a + a^2 + … + a^n) mod m.(a+a2+…an)mod输入Three integers a,n,m.(1≤a,n,m≤10^18)It ends with EOF.输出T...
分类:其他好文   时间:2014-05-10 05:01:02    阅读次数:339
LeetCode:Jump Game I II
Jump Game Given an array of non-negative integers, you are initially positioned at the first index of the array. Each element in the array represents ...
分类:其他好文   时间:2014-05-10 03:13:50    阅读次数:481
[leetcode]Single Number II @ Python
原题地址:http://oj.leetcode.com/problems/single-number-ii/题意:Given an array of integers, every element appearsthreetimes except for one. Find that single ...
分类:编程语言   时间:2014-05-10 03:01:41    阅读次数:413
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!