The Big Bang Theory: The Friendship Algorithm
Computer Science → Algorithm → Infinite Loop
Sheldon develops a friendship algorithm based on a children's book and utilizes it in an attempt to improve his friendship with Kripke. When trying to find an activity that is mutually interesting for both of them, Sheldon runs into an infinite loop in his algorithm. Howard modifies the algorithm to include a loop counter and an escape.