Halhelms
SIGN UP FOR MY NEWSLETTER

www.savorgold.com is top on wow gold and runescape gold and World of Warcraft gold provider list for trusted services. Their reputation seems to growing by the minute, which isn't surprising because they are one of the safest sellers of Gold. Delivery speed and customer service are very good. They aslo are giving some bonus items depending on the amount of gold you purchase.

 
 
Halhelms

Recent Comments

Recent Entries

RSS

A Little Code Puzzle : II

Here's another little puzzle. Here, we're trying to come up with the least processor-intensive algorithm for determining, given an array of random integers, how many are even?

I have a solution that works, but I'm not sure it's the most efficient. What's your solution? (If you want to see mine, highlight the space below -- the code is white on white).

function evens( arr ) {
	var numFound = 0;
	var i = arr.length;
	while ( i-- ){
		if ( arr[ i ] % 2 > 0 ) {
			continue;
		} else{
			numFound++;
		}
	}
	alert ( numFound );
}

A Little Code Puzzle

Here's a fun puzzle for you to try in the language of your choice. We have two boolean contrarians, A and B. (A contrarian might be too-simply defined as someone who opposes the conventional wisdom on a topic.) Since they're contrarians, we expect/want them to not agree on a topic. If they do, we're in trouble.

What's the shortest function that will return true if A is true AND B is true OR A is false AND B is false?

So You Think You're Smart, Part V

There I was the other night at a poker table, doing my part to stimulate the economy by going all in with 7-2 when someone said this: "So there's this guy who leaves home, goes a little way, turns left, goes a little way, turns left, goes a little way again, then turns left and again goes a little way. When he returns home, a man was is waiting for him. Who is it?"

After a little reflection, I confidently gave the answer. What's yours?

So You Think You're Smart? Take 4

Ah, yes. Time for another puzzler.

An evil magician has enslaved your true love. You, of course, come riding to the rescue. "Forsooth, evil magician," you say. "Release my true love."

"Yeah, well maybe not," he replies (evil magicians being predominately male and all). "But I'll tell you what. Are you feeling lucky?"

"Luck?" you say. "What need have I of luck when I am filled with virtue?"

"OK, Virtuous One. Here's the deal: you see these three cups that magically appeared in front of you? Well, one of them is poisonous, the other two are samples from my private stock of excellent wines. Pick the right one and your true love will go free."

[More]

So You Think You're Smart? Take 3

Time for another problem.

Anne and Betty set out on a trip. On their return, Betty's mother asked her, "Who drove?"

"Well," replied Betty, "on the way there, Ann drove the first 40 miles and I drove the rest."

"And you reversed that on the way home?" asked Betty's mom.

"Well, we drove the same route home, but Anne drove the first part of the trip, then I drove the last 50 miles."

"Why, that's not fair," Betty's mom said. "You too should have shared the driving equally. Instead, you drove farther."

[More]

Just for Fun

Perhaps, like me, you like your entertainment somewhat mentally stimulating. If so, see if you can switch the letters in these words around to, more or less, aptly describe them. I'll give you a couple of examples.

[More]

So You Think You're Smart? Take 2

My first "So You Think You're Smart?" puzzle was solved fast -- too fast! Here's the next one: let's see how long it takes to solve this one:

An interesting fact is that three U.S. presidents had mothers named "Rose". The three were: John Kennedy, Bill Clinton, and Woodrow Wilson.

Now, we know that mothers see their sons in the kindest light possible. Yet, in spite of this, one of these mothers (alive at the time of their son's election) didn't vote for their own son!

Question: which Rose didn't vote for her baby -- and why?

So You Think You're Smart, eh?

Happy New Year to all. This post marks the first in an ongoing series of fun puzzles. After a week, I'll post my answer. Ready?

Buzz is a bee sitting on the front of the engine pulling the New York Chief train. The train is traveling 55 mph towards Los Angeles. Buzz is just going along for the ride -- for now.

[More]

 
   
Clicky Web Analytics