Another problem doing the rounds relates to random numbers. Unlike my previous post, this one might make a (difficult) interview question: Given a function that generates a integer random number between 1 and 5, write another function that generates an integer random number between 1 and 7. Obviously you are intended to use the first … Continue reading Random Numbers Problem
Category: general
Two Philosophers Problem
A problem doing the rounds (way too hard for an interview question though): There are 2 numbers between 1 and 100 (not including 1 or 100, and they are different). Socrates knows their sum. Plato knows their product. Socrates knows that Plato knows the product. Plato knows that Socrates knows the sum. They meet and … Continue reading Two Philosophers Problem
Day 1
Welcome to my blog.