Algorithms for Credit Card