Category: algorithms
The Ackermann function is mathematically defined as: The Ack function is well-defined total math function which is compute-able but not a primitive recursive function. Its value grow so quickly …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/278/B The problem asks for the first sequence (sorted in alphabetic order) of character(s) that is not a substring of the given list of strings.The …
Count how many squares are there in the following figure. Easy validation by Python using Bruteforce, checking every possible pair of points (lower-left, and upper right) #!/usr/bin/env python # …
The problem is from codeforces: http://www.codeforces.com/contest/268/problem/B This is clearly a math counting problem. In easy description, the problem can be described as: how many numbers are there in this pattern, …
PIBAS is simple, it only has 2 possible operations: string assignment (e.g. A=’abc’) and printing (e.g. ?A). It supports only one function which is similar to the substr in Javascript …