上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 34 下一页

2015年6月17日

Basic Calculator

摘要: Basic Calculator问题:Implement a basic calculator to evaluate a simple expression string.The expression string may contain open(and closing parentheses)... 阅读全文

posted @ 2015-06-17 21:35 zhouzhou0615 阅读(239) 评论(0) 推荐(0) 编辑

2015年6月16日

Count Complete Tree Nodes

摘要: Count Complete Tree Nodes问题:Given acompletebinary tree, count the number of nodes.Definition of a complete binary tree fromWikipedia:In a complete bin... 阅读全文

posted @ 2015-06-16 17:04 zhouzhou0615 阅读(192) 评论(0) 推荐(0) 编辑

Implement Stack using Queues

摘要: Implement Stack using Queues问题:Implement the following operations of a stack using queues.push(x) -- Push element x onto stack.pop() -- Removes the el... 阅读全文

posted @ 2015-06-16 15:31 zhouzhou0615 阅读(242) 评论(0) 推荐(0) 编辑

Rectangle Area

摘要: Rectangle Area问题:Find the total area covered by tworectilinearrectangles in a2Dplane.Each rectangle is defined by its bottom left corner and top right... 阅读全文

posted @ 2015-06-16 10:22 zhouzhou0615 阅读(261) 评论(0) 推荐(0) 编辑

Invert Binary Tree

摘要: Invert Binary Tree问题:Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1思路: 简单的递归我的代码:pub... 阅读全文

posted @ 2015-06-16 09:46 zhouzhou0615 阅读(124) 评论(0) 推荐(0) 编辑

2015年6月9日

算法题——数组内有序对的最大距离

摘要: 转自:http://www.cnblogs.com/qieerbushejinshikelou/p/3916958.html题目:给定一个数组A,对于下标i 2 #include 3 using namespace std; 4 5 int maxDist(int num[], int n) ... 阅读全文

posted @ 2015-06-09 09:56 zhouzhou0615 阅读(943) 评论(0) 推荐(0) 编辑

2015年6月8日

(转)GC ROOTS

摘要: 还是英文的技术博客更给力,更清楚,本人懒,没有翻译。In your specific example, in any managed environment,Personisnota GC root; the GC root is thethingwhich holds the reference ... 阅读全文

posted @ 2015-06-08 16:17 zhouzhou0615 阅读(413) 评论(0) 推荐(0) 编辑

(转)java垃圾回收二

摘要: 转自:http://shuaijie506.iteye.com/blog/1779651在网上看到一篇不错的文章,记录下来备忘。要理解java对象的生命周期,我们需要要明白两个问题,1、java是怎么分配内存的 ,2、java是怎么回收内存的。喜欢java的人,往往因为它的内存自动管理机制,不喜欢j... 阅读全文

posted @ 2015-06-08 16:11 zhouzhou0615 阅读(162) 评论(0) 推荐(0) 编辑

(转)java垃圾回收一

摘要: 转自:http://jianfulove.iteye.com/blog/1833768一切都进入了自动化了,但是对于各种内存溢出,内存泄漏问题的出现,我们还是很有必要学习GC的。地球人都知道,Java有个东西叫垃圾收集器,它 让创建的对象不需要像C/C++那样delete、free掉,但你能不能谈谈... 阅读全文

posted @ 2015-06-08 16:10 zhouzhou0615 阅读(160) 评论(0) 推荐(0) 编辑

2015年6月5日

Contains Duplicate III

摘要: Contains Duplicate III问题:Given an array of integers, find out whether there are two distinct indicesiandjin the array such that the difference between... 阅读全文

posted @ 2015-06-05 11:11 zhouzhou0615 阅读(183) 评论(0) 推荐(0) 编辑

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 34 下一页

导航