MOUNTAIN VIEW, California (Reuters) - Democratic presidential candidate Barack Obama told Google employees on Wednesday his meteoric rise in politics mirrored the company's emergence as the lifeblood of the Internet and he surprised his hosts by answering a geeky engineering question.
"There is something improbable about this gathering," the Illinois senator told a packed cafe auditorium of hundreds of Google employees. "What we share is a belief in changing the world from the bottom up."
Obama, 46, noted that a decade ago he was a little-known Illinois state senator and the founders of Google, Sergey Brin and Larry Page, were university students with big dreams. He cited the Google founders' success when asked about his relative lack of political experience.
"I suppose Sergey and Larry did not have a lot of experience starting a Fortune 100 company," said Obama.
Some employees lined up more than an hour to hear Obama while others crowded the rafters above the auditorium.
"There's definitely been a buzz here all day," said Nicole Resz, 26, who works in Google's advertising department. "I've never seen so many people at a Google event. We've had everybody, we've had Mikhail Gorbachev."
"He's fresh, he's new, there's something about him that's Google-like."
Six other presidential candidates, including Democrats Hillary Clinton and John Edwards and Republican John McCain have already spoken at Google, which has become a major stop on the campaign trail this year.
Obama tailored his speech to an Internet-savvy audience, portraying technology as vital to winning in the global economy and in areas like health care and clean energy.
He pledged to post government data on the Internet "in universally accessible formats." Google has begun offering a suite of software products to rival those of Microsoft Corp that would benefit from such a government policy.
Obama was prepared when Google CEO Eric Schmidt, the event moderator, asked him the most efficient way to sort a million 32-bit integers.
Obama said he did not favor the bubble sort method, impressing engineers by his reference to a method of sorting out numerical algorithms.
"You answered the question correctly," Schmidt said.
Editing by Eric Beech