摘要: DescribeBesides the realization of tradictional binary tree based on recursion or stack, which needs O(n) space complexity, there also exit one struct... 阅读全文
posted @ 2015-03-30 13:48 awarrior 阅读(202) 评论(0) 推荐(0) 编辑
摘要: DescribeGiven one integer array, you have to find out two disjoint continuous sub-array A and B, which maximate the absolute value of SUM(A)-SUM(B).Fo... 阅读全文
posted @ 2015-03-30 13:42 awarrior 阅读(171) 评论(0) 推荐(0) 编辑
摘要: DescribeSample K elements in N data, and N is not sure.Imaging one setting: there is one continuous infinite data flow coming one after another, and w... 阅读全文
posted @ 2015-03-30 13:36 awarrior 阅读(112) 评论(0) 推荐(0) 编辑
摘要: DescribeThere is one integer array and you must find out one subset that contains the maximum continuous numbers with time complexity O(n).E.g. imput-... 阅读全文
posted @ 2015-03-30 13:34 awarrior 阅读(133) 评论(0) 推荐(0) 编辑
摘要: DescribeTwo players would like to pick up some from one heap of stones. Assume the quantity of stones is 100 and these two men pick up some one by one... 阅读全文
posted @ 2015-03-30 11:22 awarrior 阅读(139) 评论(0) 推荐(0) 编辑
摘要: DescribeGive you a log of searching that contains N words, how to find out one key word which appears over N/2 times (definitely exists), just using O... 阅读全文
posted @ 2015-03-30 11:18 awarrior 阅读(296) 评论(0) 推荐(0) 编辑