码迷,mamicode.com
首页 >  
搜索关键字:note    ( 7358个结果
[leetcode] Recover Binary Search Tree
题目:(Tree ,DFS)Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using ...
分类:其他好文   时间:2015-01-06 02:03:43    阅读次数:172
LeetCode实践之一 Two Sum
题目描述:  The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and...
分类:其他好文   时间:2015-01-06 00:54:53    阅读次数:171
[LeetCode]88.Merge Sorted Array
【题目】 Given two sorted integer arrays A and B, merge B into A as one sorted array. Note: You may assume that A has enough space (size that is greater or equal to m + n) to hold additional elem...
分类:其他好文   时间:2015-01-05 22:01:41    阅读次数:238
live archive 3029
/** ?*?@brief?live?archive?3029 ?*?@file?3029.cpp ?*?@author?mianma ?*?@created?2015/01/05?14:18 ?*?@edited??2015/01/05?14:18 ?*?@type?dp ?*?@note ?*/ #include?<fstream>...
分类:其他好文   时间:2015-01-05 16:55:51    阅读次数:149
【LeetCode】Factorial Trailing Zeroes
n久不做题了,之前因为考研,然后又是假期,一直懒得做,今天开始吧Givenanintegern,returnthenumberoftrailingzeroesinn!.Note:Yoursolutionshouldbeinlogarithmictimecomplexity.开始没有看到是阶乘,之后又研究复杂度的问题代码如下:classSolution{ public: inttrailingZ..
分类:其他好文   时间:2015-01-05 07:08:59    阅读次数:139
[C++]LeetCode: 66 Single Number
题目: 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 us...
分类:编程语言   时间:2015-01-04 23:10:13    阅读次数:286
uva 2678
/** ?*?@brief?live?archive?3678 ?*?@file?2678.cpp ?*?@author?mianma ?*?@created?2015/1/4?14:59 ?*?@edited??2015/1/4?14:59 ?*?@type? ?*?@note? ?*/ #include?<fstream> #in...
分类:其他好文   时间:2015-01-04 17:23:30    阅读次数:260
Pascal's Triangle II
Given an index k, return the kth row of the Pascal's triangle. For example, given k = 3, Return [1,3,3,1]. Note: Could you optimize your algorithm to use only O(k) extra space? 与Pascal's Tr...
分类:其他好文   时间:2015-01-04 17:18:04    阅读次数:169
Best Time to Buy and Sell Stock III
Say you have an array for which the ith element is the price of a given stock on day i. Design an algorithm to find the maximum profit. You may complete at most two transactions. Note: You may ...
分类:其他好文   时间:2015-01-04 17:14:20    阅读次数:130
Beginning Auto Layout Tutorial in iOS 7: Part 6
Gallery example屏幕有四个分开的相同的矩形,每个矩形有一个label和一个image view。创建一个Gallery的项目。在Main.storyboard中,拖拉一个view大小为160 by 284 points。Note: There are two main reasons ...
分类:移动开发   时间:2015-01-04 16:42:57    阅读次数:481
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!