摘要:
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number... 阅读全文
摘要:
Implement pow(x,n).思想:二分法,注意n为负数的情况public double pow(double x, int n) {if(n==0) return 1;if(n==1) return x;double k = pow(x,Math.abs(n/2));if(n>0) {if... 阅读全文
摘要:
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.思想: 用二分法的思想进行求解,左子树,中间节点,右子树,利用slow和fast指... 阅读全文
摘要:
Jump GameGiven an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents yo... 阅读全文
摘要:
HP 打印机驱动移植到Fedora 9,以及其它新系统(无包管理工具) 阅读全文