码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
[LeetCode] [Balanced Binary Tree 2012-10-08 ]
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2014-05-19 20:40:55    阅读次数:278
two sum
Question 1: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...
分类:其他好文   时间:2014-05-19 09:35:41    阅读次数:321
Leetcode | Remove Nth Node From End of List
Given a linked list, remove the nth node from the end of list and return its head.For example,Given linked list: 1->2->3->4->5, and n = 2.After removi...
分类:其他好文   时间:2014-05-19 09:16:49    阅读次数:247
hust 1625 Chessboard
题目描述Given an N*N(N#include#include#includeusing namespace std;const int maxn=1001;int group[maxn][maxn];bool vis[maxn][maxn];int dx[4]={0,0,1,-1};int ...
分类:其他好文   时间:2014-05-19 09:06:30    阅读次数:379
【LeetCode】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 your maximu...
分类:其他好文   时间:2014-05-19 08:23:07    阅读次数:223
【LeetCode】Jump Game II
Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximu...
分类:其他好文   时间:2014-05-19 08:07:26    阅读次数:288
【leetcode】Best Time to Buy and Sell Stock
Say you have an array for which theithelement is the price of a given stock on dayi.If you were only permitted to complete at most one transaction (ie...
分类:其他好文   时间:2014-05-18 20:30:16    阅读次数:301
【LeetCode】Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the fol...
分类:其他好文   时间:2014-05-18 02:11:19    阅读次数:302
【LeetCode】Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ...
分类:其他好文   时间:2014-05-18 01:52:45    阅读次数:317
Leetcode | Remove Duplicates from Sorted List I && II
Remove Duplicates from Sorted List IGiven a sorted linked list, delete all duplicates such that each element appear only once.For example,Given 1->1->...
分类:其他好文   时间:2014-05-18 01:41:31    阅读次数:361
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!