Add solution with dictionary