You wouldn’t be the first to take a peek at the answers.
The most important thing is: learn. Try hard to solve the problem. Try a couple of times. If you can’t do it, start looking for hints. When you’ve finished, do you really understand what you did? Could you do it again from memory if you had to? Could you do it in a week?