Category: algorithms
April 16, 2013
algorithms, beginner, c #, code, code library, floating point, implementation, math, optimization, programming languages, tricks
Mathematical function log10can be quite time consuming. If it is not available, for some languages such as VBScript, you have to compute it base on the fact. and therefore, we …
April 6, 2013
algorithms, assembly language, c / c++, code, compiler, implementation, interpreter / compiler, math, object pascal, optimization, programming languages, tricks
In mathematics, the absolute function is defined as: This function is simple, and quite in popular usages. The absolute value is considered as one of the fundamental operations in …
The problem of ‘Tower of Hanoi’ is a very classic problem/puzzle that is often used to teach recursion in Computer Science. The problem can be described as moving a …
The math constant e can be computed using the following series (also see this, this and this post): i.e. If we combine every two iterations, we will get something like, If …
The problem is from codeforces: http://www.codeforces.com/contest/278/problem/C The problem is graph-related and can be solved by many approaches. There is one exception case that you need to pay attention to: If …