码迷,mamicode.com
首页 >  
搜索关键字:given n integers    ( 24278个结果
LeetCode1: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 t...
分类:其他好文   时间:2014-04-30 03:20:07    阅读次数:502
LeetCode——Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2014-04-30 00:21:32    阅读次数:536
[LeetCode] 时间复杂度 O(n),空间复杂度 O(1) 的动态规划算法,题 Jump Game
Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents yo...
分类:其他好文   时间:2014-04-28 11:30:27    阅读次数:551
InPlace Transition of a matrix
Problem illustration:given a n*n matrix, print its transition, for example , 90 degree clockwise,using only constant additional spaceanalysis:using O(...
分类:其他好文   时间:2014-04-28 03:22:07    阅读次数:513
线性时间将两个有序链表合成一个有序链表(constant additional space)
description:given two sorted singly list, merge them into one using constant additional spacealgorithm:we will reference the two linked list as list1 ...
分类:其他好文   时间:2014-04-28 00:32:52    阅读次数:711
[Leetcode] ZigZag Conversion
The string"PAYPALISHIRING"is written in a zigzag pattern on a given number of rows like this: (you may want to display this pattern in a fixed font fo...
分类:其他好文   时间:2014-04-27 21:36:45    阅读次数:515
hdu 1081 To The Max
To The Max Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 7533    Accepted Submission(s): 3647 Problem Description Given a two-dim...
分类:其他好文   时间:2014-04-27 19:54:26    阅读次数:624
leetcode day4 -- Binary Tree Postorder(Preorder) Traversal && Edit Distance
?? 1、Binary Tree Postorder Traversal Given a binary tree, return the postorder traversal of its nodes' values. For example: Given binary tree {1,#,2,3}, 1 2 / 3 retu...
分类:其他好文   时间:2014-04-27 18:58:59    阅读次数:481
24278条   上一页 1 ... 2426 2427 2428
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!