码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single ...
分类:其他好文   时间:2014-05-16 23:18:16    阅读次数:360
【LeetCode】Merge Intervals
Given a collection of intervals, merge all overlapping intervals.For example,Given[1,3],[2,6],[8,10],[15,18],return[1,6],[8,10],[15,18].public class S...
分类:其他好文   时间:2014-05-16 08:44:29    阅读次数:276
LeetCode OJ - Reverse Words in a String
题目: Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the".解题思路: 1、先对字符串进行一次总...
分类:其他好文   时间:2014-05-16 05:44:30    阅读次数:263
LeetCode OJ - Linked List Cycle
题目: Given a linked list, determine if it has a cycle in it. Follow up: Can you solve it without using extra space?解题思路: 使用快慢指针,快指针每次走两步,慢指针每次走一步...
分类:其他好文   时间:2014-05-16 05:19:21    阅读次数:271
LeetCode OJ - Linked List Cycle II
题目: Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull. Follow up: Can you solve it without using extr...
分类:其他好文   时间:2014-05-16 04:50:13    阅读次数:329
Leetcode | Interleaving String
Given s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = "aadbbcbcac", retur...
分类:其他好文   时间:2014-05-13 18:11:42    阅读次数:249
POJ 3017 单调队列dp
Cut the Sequence Time Limit: 2000MS   Memory Limit: 131072K Total Submissions: 8764   Accepted: 2576 Description Given an integer sequence { an } of length N, you are to ...
分类:其他好文   时间:2014-05-13 16:04:29    阅读次数:267
Leetcode 树 Unique Binary Search Trees
本文为senlie原创,转载请保留此地址:http://blog.csdn.net/zhengsenlie Unique Binary Search Trees  Total Accepted: 13478 Total Submissions: 37858 Given n, how many structurally unique BST's (bin...
分类:其他好文   时间:2014-05-13 15:21:22    阅读次数:291
Best Time to Buy and Sell Stock
原题: Say you have an array for which the ith element is the price of a given stock on day i. If you were only permitted to complete at most one transaction (ie, buy one and sell one share of th...
分类:其他好文   时间:2014-05-13 14:12:41    阅读次数:342
ZOJ3672:Gao The Sequence
You are given a sequence of integers, A1,A2,...,An. And you are allowed a manipulation on the sequence to transform the origin sequence into another sequence B1,B2,...,Bn(Maybe the two sequences are s...
分类:其他好文   时间:2014-05-13 13:45:10    阅读次数:327
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!