Common Algorithms for programming competitiona