My routine was to solve the problem, then spend time reading through the solutions in the forum to see how I could optimize my code. Many times this meant completely rewriting my solution. For a lot of problems I spent more time making my code run as fast as possible than I did solving the problem in the first place. Doing this was critical for learning algorithms and techniques that I needed to solve future problems.