Barack Obama added another "first" to his already notable list yesterday: he became the first U.S. presidential candidate -- and, I'm guessing, the first high-level elected official in any country -- to have a ready answer to a standard Google engineering interview question. Asked by Eric Schmidt about "the most efficient way to sort a million 32-bit integers," Sen. Obama replied that "the bubble sort would be the wrong way to go." Though some might view this as shameless pandering to the bucket-sorting community, others will see a bold pragmatism.

Following Ron Paul, Hillary Clinton, John McCain, Bill Richardson, John Edwards, and Mike Gravel, Obama became the seventh presidential candidate to visit Google's main campus in Mountain View. Obama got a warm reception from an overflow crowd at Charlie's Cafe, with hundreds of employees watching via live webcast from forty remote locations. Looking out over the sea of t-shirts, Sen. Obama paid tribute to Silicon Valley style: "It's good to see Google is maintaining its strict dress code."

After a screening of his Monday Night Football clip and an introduction by Google's Senior VP David Drummond, Obama unveiled his new policy agenda on technology and innovation. He reaffirmed his support for network neutrality, saying:

The Internet is perhaps the most open network in history. We have to keep it that way.

Obama laid out a detailed package of technology policies designed to strengthen online privacy, increase government openness and transparency, put high-speed broadband within reach of all Americans, improve the delivery government services, drive America's competitiveness, reform our abuse-prone patent system, and free up wireless spectrum for new connectivity and public safety.

As part of his plan, Sen. Obama said he would use the Internet to give citizens better visibility into, and greater participation in, the workings of their government:

I’ll put government data online in universally accessible formats. I’ll let citizens track federal grants, contracts, earmarks, and lobbyist contacts. I’ll let you participate in government forums, ask questions in real time, offer suggestions that will be reviewed before decisions are made, and let you comment on legislation before it is signed. And to ensure that every government agency is meeting 21st century standards, I’ll appoint the nation’s first Chief Technology Officer.

After Obama finished his speech, Eric Schmidt joined him on stage for a "fireside chat" (except without the crackling fire). After a particularly open-ended first question ("What is it that you're going to do that's exceptional?"), Obama looked out and asked, "Is this the kind of interview that you guys went through?" (The answer is "yes," except we went through eight of them, and they focused more on how to sort 32-bit integers and less on how to counter the threat of global terrorism).

During the discussion, Obama made the case for his ability to bring Americans together, take on special interests, and bring new credibility to foreign relations. In about thirty minutes he covered a lot of ground: Iraq, Guantanamo, international relations and diplomacy, globalization, education, health care, college loans, Social Security, and race. Googler Ethan Beard asked Obama about fears that he lacks experience; he started his response by noting that Google founders "Larry and Sergey didn't have a lot of experience starting a Fortune 100 company."

The final question of the day was about political reform -- how to fix a broken system of political and government? Sen. Obama observed that the more people know, the more lawmakers and officials can be held accountable. He talked about his "Google for Government" bill, now law, to create a searchable database for every dollar of federal spending. He said, "If you give people good information, they will make good decisions."

Here's the complete video of Senator Obama's fireside chat:

Senator Obama also sat for an interview with YouTube's Steve Grove, with the questions posed by the YouTube community: