From an interview question, as described in this blog post: http://codrspace.com/szeitlin/shuffling-the-deck-an-interview-question/
From an interview question, as described in this blog post: http://codrspace.com/szeitlin/shuffling-the-deck-an-interview-question/