Category: algorithms
Windows batch script is less powerful, at least in my opinion, than the bash script under linux environment. However, with the latest OS like Win7, using batch allows to …
Bogosort is a purely random sorting algorithm. It is inefficient because it is probablistic in nature. The algorithm is simple. Randoming shuffling the array until they are in order. …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/118/A Python is good at string manipulations. The problem is easy and the solution is straightforward. Just read the problem statement carefully… I didn’t …
May 20, 2012
algorithms, beginner, code, codeforces, data structure, implementation, programming languages, python, string, technical
The problem is from codeforces: http://www.codeforces.com/problemset/problem/158/C Using a stack will help solve this problem. Luckly, python supports stack structure by using list. The append() and pop() are used to …
The problem is from codeforces: http://www.codeforces.com/problemset/problem/102/B The input can be very large, you might wonder to use long arithmetic via arrays. However, it might be easier than you think. …