上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 84 下一页
摘要: A peak element is an element that is greater than its neighbors.Given an input array wherenum[i] ≠ num[i+1], find a peak element and return its index.... 阅读全文
posted @ 2015-07-08 17:50 穆穆兔兔 阅读(166) 评论(0) 推荐(0) 编辑
摘要: Write a program to find the node at which the intersection of two singly linked lists begins.For example, the following two linked lists:A: a... 阅读全文
posted @ 2015-07-08 16:35 穆穆兔兔 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 转载,写的非常好!!http://www.cnblogs.com/skynet/p/3372855.html这次分享的宗旨是——让大家学会创建与使用静态库、动态库,知道静态库与动态库的区别,知道使用的时候如何选择。这里不深入介绍静态库、动态库的底层格式,内存布局等,有兴趣的同学,推荐一本书《程序员的... 阅读全文
posted @ 2015-07-07 15:22 穆穆兔兔 阅读(447) 评论(0) 推荐(0) 编辑
摘要: 模板为什么要特化,因为编译器认为,对于特定的类型,如果你能对某一功能更好的实现,那么就该听你的。模板分为类模板与函数模板,特化分为全特化与偏特化。全特化就是限定死模板实现的具体类型,偏特化就是如果这个模板有多个类型,那么只限定其中的一部分。先看类模板:templateclass Test{publi... 阅读全文
posted @ 2015-07-07 15:05 穆穆兔兔 阅读(573) 评论(0) 推荐(0) 编辑
摘要: Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack.pop() -- Removes... 阅读全文
posted @ 2015-07-06 22:39 穆穆兔兔 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the... 阅读全文
posted @ 2015-07-06 18:08 穆穆兔兔 阅读(122) 评论(0) 推荐(0) 编辑
摘要: Given an input string, reverse the string word by word.For example,Given s = "the sky is blue",return "blue is sky the".Update (2015-02-12):For C prog... 阅读全文
posted @ 2015-07-06 17:36 穆穆兔兔 阅读(255) 评论(0) 推荐(0) 编辑
摘要: Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another express... 阅读全文
posted @ 2015-07-06 16:14 穆穆兔兔 阅读(200) 评论(0) 推荐(0) 编辑
摘要: PlaceHolder 阅读全文
posted @ 2015-07-06 15:36 穆穆兔兔 阅读(150) 评论(0) 推荐(0) 编辑
摘要: Given a binary search tree, write a functionkthSmallestto find thekth smallest element in it.Note:You may assume k is always valid, 1 ≤ k ≤ BST's tota... 阅读全文
posted @ 2015-07-06 15:32 穆穆兔兔 阅读(279) 评论(0) 推荐(0) 编辑
上一页 1 ··· 47 48 49 50 51 52 53 54 55 ··· 84 下一页