You've certainly come to the right community! Read Hacker News daily as a supplement to your programming self-study and you'll inevitably come across some great resources.
This is exactly how I implemented my solution.
The worst case scenario is important because some images have last strips that have a unique "next strip" value.