Volume of n-ball

If we denote the Cartesian coordinate of a \(n\)-dimensional Euclidean space by a \(n\)-vector \(\mathbf{x}\), then a \(n\)-ball centered at the origin with radius \(r\) is the set of points that satisfy [more]

Simultaneous Equations in Two Unknowns

Consider this problem: A list of distinctive integers in random order is provided. The integer is in the range of \(1\) to \(N\) and there are \(N-1\) integers provided, i.e. one integer in \([1,N]\) is not in the provided list. Find that number in \(O(1)\) space and \(O(N)\) time. [more]

Threads

C++11 came out for a while and recently I did some experiment with it. The most interesting feature in C++11 to me is the standardization of threading syntax in the language. Before that, we can only use pthread library for threading. [more]