摘要:
Given an array where elements are sorted in ascending order, convert it to a height balanced BST. 阅读全文
摘要:
Implement int sqrt(int x). Compute and return the square root of x. 方法一:牛顿迭代 f(x)=f(x0)+f'(x0)(x-x0) >x=x0-f(x0)/f'(x0) 在此处f(x)=x^2-n, f'(x)=2x,代入并整理得 阅读全文
摘要:
Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order. For example,Given the following matrix: You s 阅读全文
摘要:
Implement pow(x, n). 阅读全文