## Higher than a building

What jumps higher than a building?

All animals can jump higher than a building. Buildings do not jump.

the answer

What jumps higher than a building?

All animals can jump higher than a building. Buildings do not jump.

the answer

Joe bets Tony $100 that he can predict the score of the football game before it starts. Tony agrees, but loses the bet. Why did Tony lose the bet?

Joe said the score would be 0-0 and he was right. "Before" any football game starts, the score is always 0-0.

the answer

What is a lion’s favorite state?

Maine.

the answer

I can swim or walk for miles.
I’m big with thick, white hair.
I live up in the Arctic.
What I am?

Polar bear.

the answer

With thieves I consort,
with the vilest, in short,
I'm quite at ease in depravity;
Yes all divines use me,
And savants can't lose me,
For I am the center of gravity.

V.

the answer

A hundred feet in the air, but it's back is on the ground. What is it?

A Centipede that turned upside down.

the answer

What did the mother broom say to the baby broom?

It's time to go to sweep.

the answer

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)
A.initializeValues(0)
for each character in S1
arrayIndex = mapCharacterToNumber(character) //maps "a" to 0, "b" to 1, "c" to 2, etc...
A[arrayIndex] += 1
end
for each character in S2
arrayIndex = mapCharacterToNumber(character)
A[arrayIndex] -= 1
end
for (i = 0; i < 26; i++)
if A[i] != 0
return false
end
end
return true
end

the answer

I run over fields and woods all day. Under the bed at night I sit, never alone. My tongue hangs out, up and to the rear, waiting to be filled in the morning. What am I?

A shoe.

the answer

What does the orange do, when it takes a test?

It concentrates.

the answer

© 2020 SOLVE or DIE

Design by Talmer.cz