Added C, C++ and Python implementations.