Added Backtrack algorithm