03 2015 档案
摘要:Given an array where elements are sorted in ascending order, convert it to a height balanced BST.题解:递归就可以了。Java代码如下: 1 /** 2 * Definition for binary ...
阅读全文
摘要: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 that the arr...
阅读全文
摘要:Given an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a linear runtime comp...
阅读全文
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or...
阅读全文
摘要:Write a function that takes an unsigned integer and returns the number of ’1' bits it has (also known as theHamming weight).For example, the 32-bit in...
阅读全文
摘要:Related to questionExcel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A ...
阅读全文
摘要:寒假老板给的任务,让我重现这个实验http://www.liuhaihua.cn/archives/15565.html。自己就随便试了下,用的都是比较经典(lao)的算法和知识,记录一下。一、从网页上爬取POI数据 找了一圈,感觉这个网站比较靠谱:http://www.poi86.com,因为这...
阅读全文