Implement int sqrt(int x).
Compute and return the square root of x.
原题链接:https://oj.leetcode.com/problems/sqrtx/
使用二分法来解题。
public int sqrt(int x) {
if(x == 0 || x== 1)
return x;
in...
分类:
其他好文 时间:
2014-11-21 16:24:07
阅读次数:
175
Let $A$ be a nilpotent operator. Show how to obtain, from aJordan basis for $A$, aJordan basis of $\wedge^2A$.
分类:
其他好文 时间:
2014-11-21 10:37:06
阅读次数:
160
Let $\scrM$ be a $p$-dimensional subspace of $\scrH$ and $\scrN$ its orthogonal complement. Choosing $j$ vectors from $\scrM$ and $k-j$ vectors from $...
分类:
其他好文 时间:
2014-11-21 10:24:43
阅读次数:
159
If $\dim \scrH=3$, then $\dim \otimes^3\scrH =27$, $\dim \wedge^3\scrH =1$ and $\dim \vee^3\scrH =10$. In terms of an orthonormal basis of $\scrH$, wr...
分类:
其他好文 时间:
2014-11-21 10:24:21
阅读次数:
121
Prove that for any vectors $$\bex u_1,\cdots,u_k,\quad v_1,\cdots,v_k, \eex$$ we have $$\bex |\det(\sef{u_i,v_j})|^2 \leq \det\sex{\sef{u_i,u_j}}\cdot...
分类:
其他好文 时间:
2014-11-21 10:21:56
阅读次数:
155
Show that the inner product $$\bex \sef{x_1\vee \cdots \vee x_k,y_1\vee \cdots\vee y_k} \eex$$ is equal to the permanent of the $k\times k$ matrix $\s...
分类:
其他好文 时间:
2014-11-21 10:20:49
阅读次数:
259
The elementary tensors $x\otimes \cdots \otimes x$, with all factors equal, are all in the subspace $\vee^k\scrH$. Do they span it?
分类:
其他好文 时间:
2014-11-21 10:18:30
阅读次数:
134
Show that the inner product $$\bex \sef{x_1\wedge \cdots \wedge x_k,y_1\wedge \cdots\wedge y_k} \eex$$ is equal to the determinant of the $k\times k$ ...
分类:
其他好文 时间:
2014-11-21 09:09:37
阅读次数:
225
From:http://machinelearningmastery.com/practical-machine-learning-problems/Practical Machine Learning ProblemsWhat is Machine Learning? We can readaut...
分类:
其他好文 时间:
2014-11-20 20:11:17
阅读次数:
394
类似的问题还有: why can't class template use Handle Class Pattern to hide its implementation? || why there are linker problems (undefined reference) to my cl...
分类:
编程语言 时间:
2014-11-19 20:18:49
阅读次数:
526