Implementation of common algorithms in java or python