Add another slightly different solution using back track.