The first part is usually something that you can solve with the most obvious algorithm... the second part requires a far more optimum solution. These exercises are fun, challenging, and online, you can do them any time.
Also note that these are great for trying out that new programming language you wanted to learn.