on May 27, 2009 by Adam in Uncategorized, Comments (2)
I think Bubble Sort is the Wrong Way to Go
Barack Obama knows some computer science, and he is right about this! Although I couldn’t watch the video (it is on YouTube and right now I can’t access Youtube
) I read the transcript and it is hilarious.
He was asked by chief executive Eric Schmidt about “the most efficient way to sort a million 32-bit integers,” a problem in computer coding. (Obama apparently had been given the question in advance and was told it stumped McCain on his visit to Google.)
Without missing a beat, Obama said, correctly, “I think the bubble sort would be the wrong way to go.” Then he smiled.
For those who don’t know, bubble sort is a naive algorithm going through the list usually multiple times and sorting neighboring integers with O(n^2) performance.
However I’m certain computer scientists would argue over whether or not this is a valid question as this is largely hardware dependent. If he knew the provable right answer to that could probably make 10 X more than what he could as President. So good answer President!
Tags: Barack Obama
Ken Albin
June 1, 2009 @ 1:11 am
I’m impressed! I doubt hardly anyone remembers bubble sorts in this age of canned programs. He must have taken a C or Fortran programming course sometime in the past.
mireillemiv
October 24, 2009 @ 11:59 pm
Do you want a joke?
What do you get when you cross a squirrel with a kangaroo? An animal that keeps its nuts in its pockets.