Tag: algorithms
The problem is from codeforces: http://www.codeforces.com/problemset/problem/245/B It is an easy string-matching related problem. You can have many ways to solve this. Because of the limitation, i.e. the first letter must …
In reality, many applications can be represented as Knapsack problems. The knapsack problem is one of the most classic combinatics mathematics problems. The knapscak problems are of serveral types. …
This was an interview question from Google. The difficulty is entry level. The question asks how many zeros are there for the numerical result of 1024!, which is 1 …
In and , the interesting equations are introduced to compute the math constant . Let’s review that the following equation: It can be also equivalent to the following: Compared …
In , mathematical constant is introduced. Below, a simple equation is presented to compute its value. , when . Therefore, is a infinity loopless irrational number. #!/usr/bin/env python from …