The 100 Prisoners Problem (also known as “The 50 Lockers Puzzle”) is a mathematical problem in probability theory and combinatorics. It’s also a fun (but difficult) puzzle for the curious mind. In this blog post, I will provide an overview of the problem and present a few observations before revealing the final solution.
Overview of the 100 Prisoners Problem
Let’s imagine that we have 100 prisoners. Each one has their own distinct number from 1 to 100 (their index if you will). Each one of these prisoners is on death row and the director of the prison is a cruel trickster and a betting man. He offers the prisoners one last ditch effort to escape. (more…)
In this article we’ll go over the
Lately I’ve been working on projects and problems that aren’t related to the field of web development and I’ve started to feel my touch slipping. Naturally, in such a situation you need to find a way to keep you skills up-to-date without using too much time. As such, I decided to do my first 7 day web dev challenge and I’ll be posting my results on CodePen.
The idea is to do a fun pen every day for seven days in a row. It’s not a very difficult task for a lot of you who are probably reading this, but when you are very short on time it can be a bit of challenge. Let’s look at the plan so far, shall we?
Planned challenges (you can see the results with comments and tips below this list): (more…)
Today’s snippet will show you how to create a fun and practical CSS3 spinner animation. Technically, you can use something like this for your loading screens which is pretty nifty since you (for example) won’t have to use any GIFs or SVGs. It’s been a while since my last Codepen snippet so I knew I had to come back to the blog with something brand new and exciting.
I’ve been playing around with various transform properties and I’ve found that you can create some pretty cool things using rotate and scale. Let’s look at the final result and then we’ll look at the code. Here’s the preview: