This is a newspaper headline:
Workers Strike - Want to Make Less Money!
What is going on?
The workers work at the mint and are tired of being overworked. They want to work less, which is making less money, since money is made at the mind!funnyshort
What is blue, green, yellow, purple, brown, black, and grey?
A box of crayonst.logic
General Custer is surrounded by Indians and he's the only cowboy left.
He finds an old lamp in front of him and rubs it. Out pops a genie. The genie grants Custer one wish, with a catch. He says, "Whatever you wish for, each Indian will get two of the same thing." Custer ponders a while and thinks:"If I get a bow and arrow they get two. If I get a rifle they get two!" He then rubs the bottle again and out pops the genie. "Well," the genie asks "have you made up your mind?"
What did Custer ask for to help him get away?
One glass eye.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
Dracula’s going to the bank to keep his money, he seems a little more pale than usual, which bank did he go to?
A Blood Bank.logicmystery
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.animalfunnyshort
What is more impressive than a talking dog?
A spelling bee.animalcleanshortwhat am I
I am alive without breath and cold as death. I am never thirsty but always drinking. What am I?
How much dirt would be in a hole 6 feet deep and 6 feet wide that has been dug with a square edged shovel?
No matter how big a hole is, it's still a hole: the absence of dirt.
And those of you who said 36 cubic feet are wrong for another reason, too.
You would have needed the length measurement too.
So you don't even know how much air is in the hole.cleanshort
What is the ancient invention that allows people to see through walls?