Pete is a worker on a large ship with hundreds of other men. He is constantly making mistakes, tying ropes the wrong way, steering the ship the wrong way, and making other blunders. One time he accidentally caused the ship to get stuck in a shallow shore, causing thousands of dollars in damage.
However, when Steve, the captain of the ship, is asked about Pete, Steve says "I wish we had five men like Pete on this ship."
Why would he say this?
See also best riddles or new riddles.cleanlogicwhat am I
I’m teary-eyed but never cry,
silver-tongued, but never lie.
double-winged, but never fly,
air-cooled, but never dry.
What am I?
Mercury. The element looks shiny, silver, and is wet. The god Mercury has two wings but only uses them to run.logic
A man is found dead in the desert. He is wearing only his underwear. Half of a straw is found nearby.
How did this man die?
The man was flying in a hot-air balloon with another man over the desert. The balloon started to go down because of excess weight. Both men would die if they ended up stranded in the desert, so they stripped down to their underwear and threw their clothes off the balloon to try to reduce the weight. Unfortunately, that didn't work well enough. So they drew straws to decide who would jump. The dead man pulled the short straw and jumped out of the balloon.cleanlogicmathshort
Would you have more money with a million dollars today or a penny today and double your money every day for 31 days?
Second option. Double your money every day for 31 days.logicmath
Two words are anagrams if and only if they contain the exact same letters with the exact same frequency (for example, "name" and "mean" are anagrams, but "red" and "deer" are not).
Given two strings S1 and S2, which each only contain the lowercase letters a through z, write a program to determine if S1 and S2 are anagrams. The program must have a running time of O(n + m), where n and m are the lengths of S1 and S2, respectively, and it must have O(1) (constant) space usage.
First create an array A of length 26, representing the counts of each letter of the alphabet, with each value initialized to 0. Iterate through each character in S1 and add 1 to the corresponding entry in A. Once this iteration is complete, A will contain the counts for the letters in S1. Then, iterate through each character in S2, and subtract 1 from each corresponding entry in A. Now, if the each entry in A is 0, then S1 and S2 are anagrams; otherwise, S1 and S2 aren't anagrams.
Here is pseudocode for the procedure that was described:
def areAnagrams(S1, S2)
A = new Array(26)
for each character in S1
arrayIndex = mapCharacterToNumber(character) //maps "a" to 0, "b" to 1, "c" to 2, etc...
A[arrayIndex] += 1
for each character in S2
arrayIndex = mapCharacterToNumber(character)
A[arrayIndex] -= 1
for (i = 0; i < 26; i++)
if A[i] != 0
It was a man's birthday. He lay dead in the lounge room of his house. Next to his body was a note, written in pencil. The note read 'Happy Birthday, Friend'. The victim had a girlfriend and the police suspected her ex-boyfriend. They could find no obvious evidence. While searching the ex-boyfriend's car, the police saw an envelope with the girlfriend's address written on it. They thought they would get the handwriting checked against the note. The scientist in charge came in early to work the next day; it was 7am. He looked out his window which faced east and stared at the rising sun and it was then that he realised how to prove the ex-boyfriend killed the man, even though the girlfriend's address was not written in the same handwriting. How did he do it?
The scientist's office faced east, and the sun was coming in through the window at a very low angle. He saw some very faint shadows on the surface of the envelope. He looked closer. There were the words embossed on the paper. They read "Happy Birthday, Friend". The ex-boyfriend had forgotten that a pencil leaves an impression on paper beneath the page written on.logic
At a local bar, three friends, Mr. Green, Mr. Red and Mr. Blue, were having a drink. One man was wearing a red suit; one a green suit; and the other a blue suit. "Have you noticed," said the man in the blue suit, "that although our suits have colors corresponding to our names, not one of us is wearing a suit that matches our own names?" Mr. Red looked at the other two and said, "You're absolutely correct." What color suit is each man wearing?
Since none of the men are wearing the color of suit that corresponds to their names, and Mr. Red was replying to the man in the blue suit, it had to be Mr. Green to whom he replied. We then know that Mr. Green is wearing a blue suit. Therefore, Mr. Red is wearing a green suit and Mr. Blue is wearing a red suit. cleanlogic
A man wanted to enter an exclusive club but did not know the password that was required. He waited by the door and listened. A club member knocked on the door and the doorman said, "twelve." The member replied, "six " and was let in. A second member came to the door and the doorman said, "six." The member replied, "three" and was let in. The man thought he had heard enough and walked up to the door. The doorman said ,"ten" and the man replied, "five." But he was not let in. What was the right answer then?
Three. The doorman lets in those who answer with the number of letters in the word the doorman says.logic
A fancy restaurant in New York was offering a promotional deal. A married couple could eat at the restaurant for half-price on their anniversary. To prevent scams, the couple would need proof of their wedding date. One Thursday evening, a couple claimed it was their anniversary, but didn't bring any proof. The restaurant manager was called to speak with the couple. When the manager asked to hear about the wedding day, the wife replied with the following: "Oh, it was a wonderful Sunday afternoon, birds were chirping, and flowers were in full bloom." After nearly 10 minutes of ranting, she comes to tell him that today was their 28th wedding anniversary.
"How lovely", the manager said, "However, you do not qualify for the discount. Today is not your anniversary, you are a liar".
How did the manager know that it wasn't their anniversary?
The calendar repeats itself every 28 years. So, if they were married on a Sunday 28 years ago, the day they were at the restaurant would also have to be a Sunday. Since it was a Thursday, the manager knew they were lying, and abruptly kicked them out of his restaurant.logic
A number of people have broken the sound barrier, either in a super-fast car, or in nice fancy planes. However, hundreds of years ago it was broken on horseback. How?
Many people who ride horses carry whips. They crack the whip while they ride the horse. When a whip is cracked, the tip travels faster than the speed of sound, which makes the loud snap. It actually creates a miniature sonic boom of sorts. The whip breaks the sound barrier, thus, it was broken on horseback.logic
This teaser is based on a weird but true story from a few years ago. A complaint was received by the president of a major car company: "This is the fourth time I have written you, and I don't blame you for not answering me because I must sound crazy, but it is a fact that we have a tradition in our family of having ice cream for dessert after dinner each night. Every night after we've eaten, the family votes on which flavor of ice cream we should have and I drive down to the store to get it. I recently purchased a new Pantsmobile from your company and since then my trips to the store have created a problem. You see, every time I buy vanilla ice cream my car won't start. If I get any other kind of ice cream the car starts just fine. I want you to know I'm serious about this question, no matter how silly it sounds: 'What is there about a Pantsmobile that makes it not start when I get vanilla ice cream, and easy to start whenever I get any other kind?'" The Pantsmobile company President was understandably skeptical about the letter, but he sent an engineer to check it out anyway. He had arranged to meet the man just after dinner time, so the two hopped into the car and drove to the grocery store. The man bought vanilla ice cream that night and, sure enough, after they came back to the car it wouldn't start for several minutes. The engineer returned for three more nights. The first night, the man got chocolate. The car started right away. The second night, he got strawberry and again the car started right up. The third night he bought vanilla and the car failed to start. There was a logical reason why the man's car wouldn't start when he bought vanilla ice cream. What was it?
HINT: The man lived in an extremely hot city, and this took place during the summer. Also, the layout of the grocery store was such that it took the man less time to buy vanilla ice cream.
Vanilla ice cream was the most popular flavor and was on display in a little case near the express check out, while the other flavors were in the back of the store and took more time to select and check out. This mattered because the man's car was experiencing vapor lock, which is excess heat boiling the fuel in the fuel line and the resulting air bubbles blocking the flow of fuel until the car has enough time to cool.. When the car was running there was enough pressure to move the bubbles along, but not when the car was trying to start.