From k-SAT to k-CSP: Two Generalized Algorithms