The knight always tells the truth. The knave always lies. The Chaos tosses a coin each day and depending on the coin toss, decides to either be a Knight or a Knave for the day. The 3 of them look identical and you don't know who is who. Can you ask at most 3 yes/no questions to them and on the basis of their answers guess who is … Continue reading the story "knights, knaves and Chaos"
Monthly Archives for December, 2013
Prove using "formal logic" that in every bar, there is some person such that if that person is drinking, everyone else in the bar is drinking. - via Wikipedia
"What happens when an unstoppable force meets an immovable object?" It's similar in form to the Omnipotence paradox: "Can God make a stone that he cannot lift?" Can you resolve this paradox? - via Wikipedia
You are given two strings s1 and s2. Your goal is to determine if s2 is a substring of s1. What is the minimum time complexity you can achieve? Give your complexity in terms of the string lengths l1,l2 of s1,s2 respectively. - A practice interview question.
There are two types of pills. You are supposed to take 2 pills: 1 of each type. However, you have accidentally mixed 2 pills of each type, a total of 4 pills. Both types of pills are identical. You don't want to waste any pills because they are expensive. How can you use these 4 pills in 2 occasions without messing up the dosage? - via … Continue reading the story "Pills"
Here is a task.
- First choose a single 4-digit number. When choosing, please avoid numbers with four identical digits like 1111 or 2222.
- Arrange the four digits from left to right in descending order on a horizontal line.
- Immediately below that, arrange the four digits from left to right in ascending order.
- Subtract line 3 from line 2
- With that answer go to step 2. Continue until you find a … Continue reading the story "Find a pattern"
There are 25 soldiers and they all want to cross a river. There are 2 boys with a small boat. The boat is so small that it can either hold the two boys, or 1 soldier, but no more. How can the boys transport all soldiers across the river and still be in possession of the boat? - via Algorithmic puzzles
For what values of n>1 can you dissect a rectangle into n right-angled triangles? - via Algorithmic Puzzles
In the picture below, if you zoom in enough, you will find there is no blue color. Explain why this optical illusion occurs. - via Buzz hunt
A mule walks the same distance everyday. However, two of it's legs walk only 10km whereas the remaining two legs walk 12km. Why? (Give the most logical explanation as to why this can hold true). - via Gpuzzles