Add first implementation of solutions
Improve efficiency
Improved efficiency by keeping endState