157 Add AC solution with tests