02 2015 档案
摘要:The problem:Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are s...
阅读全文
摘要:The problem:Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.My analysis:The idea behind ...
阅读全文
摘要:The problem:Given node P and node Q in a binary tree T.Find out the lowest common ancestor of the two nodes.Analysis:The answer of this problem could ...
阅读全文
摘要:The problem:Given an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may assume ...
阅读全文