<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>阅微堂 &#187; 题库</title>
	<atom:link href="http://zhiqiang.org/blog/tag/%e9%a2%98%e5%ba%93/feed" rel="self" type="application/rss+xml" />
	<link>http://zhiqiang.org/blog</link>
	<description>理工科背景的证券从业人员</description>
	<lastBuildDate>Sun, 05 Feb 2012 03:59:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>一个算法面试题 &amp; 面试题库</title>
		<link>http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html</link>
		<comments>http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html#comments</comments>
		<pubDate>Fri, 27 Apr 2007 14:34:47 +0000</pubDate>
		<dc:creator>zhiqiang</dc:creator>
				<category><![CDATA[计算机科学]]></category>
		<category><![CDATA[算法]]></category>
		<category><![CDATA[面试题]]></category>
		<category><![CDATA[题库]]></category>

		<guid isPermaLink="false">http://zhiqiang.org/blog/579.html</guid>
		<description><![CDATA[博客 » 计算机科学 » 算法 » 系列：面试题 查看该系列所有文章 一个面试题，号称是微软的 输入，如何在O(n)的时间，用O(1)的空间，将这个序列顺序改为。 刚一眼看上去觉得很容易，做了一回儿才发现深不可测。题目大致是要求在线性时间，常数空间实现下面的置换 x -&#62; 2x mod 2n+1 我做了两小时没做出来，上网一搜，最近这个题目很热，已经有人在讨论这个题目，还翻出了...]]></description>
			<content:encoded><![CDATA[<p id="breadcrumb" class="breadcrumb"><a href="http://zhiqiang.org/blog/">博客</a> » <a href="http://zhiqiang.org/blog/category/science/computer-science">计算机科学</a> » <a href='http://zhiqiang.org/blog/tag/%e7%ae%97%e6%b3%95'>算法</a>  » </p><div class="series"><span>系列：<b>面试题</b></span><br/>
<a href="http://zhiqiang.org/blog/tag/%e9%9d%a2%e8%af%95%e9%a2%98">查看该系列所有文章</a>
<div id='series'></div>
</div>  <p>一个面试题，号称是微软的</p>
<blockquote><p>输入<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_ba1377aac1d336e1fab5478bfeca1441.gif' style='vertical-align: middle; border: none; ' class='tex' alt="a_1, a_2, ..., a_n, b_1, b_2, ..., b_n" /></span><script type='math/tex'>a_1, a_2, ..., a_n, b_1, b_2, ..., b_n</script>，如何在O(n)的时间，用O(1)的空间，将这个序列顺序改为<span class='MathJax_Preview'><img src='http://zhiqiang.org/blog/wp-content/plugins/latex/cache/tex_eae382be315ec97810a6e2d618f57b8a.gif' style='vertical-align: middle; border: none; ' class='tex' alt="a_1, b_1, ..., a_n, b_n" /></span><script type='math/tex'>a_1, b_1, ..., a_n, b_n</script>。</p>
</blockquote>
<p>刚一眼看上去觉得很容易，做了一回儿才发现深不可测。题目大致是要求在线性时间，常数空间实现下面的置换</p>
<blockquote><p align="left">x -&gt; 2x mod 2n+1</p>
</blockquote>
<p>我做了两小时没做出来，上网一搜，最近这个题目很热，已经<a href="http://discuss.techinterview.org/default.asp?interview.11.482833.2" target="_blank" rel="nofollow">有人在讨论这个题目</a>，还翻出了问题的发源地<a title="http://www.cs.uvic.ca/~jellis/perfect.html" href="http://webhome.cs.uvic.ca/~jellis/perfect.html">http://www.cs.uvic.ca/~jellis/perfect.html</a>，一个完美<a href="http://zhiqiang.org/blog/science/the-perfect-number-of-shuffling-7-times.html">洗牌</a>的构造问题。此网页上一篇长达12页的论文<a href="http://webhome.cs.uvic.ca/~jellis/Publications/shuffle.ps">Computing the Cycles in the Perfect Shuffle Permutation</a>给出了完整的算法和证明。</p>
<p>不知道有没有人给出直接而简便的方法？</p>
<p>在搜索过程中发现两个很好的程序设计类面试题库（英文），共享一下，如果你想面试Microsoft，Google或者Goldman Sachs，看看这两个网站上的题目就可以了。</p>
<ul>
<li><a href="http://discuss.techinterview.org/default.asp?interview" target="_blank" rel="nofollow">techInterview Discussion</a></li>
<li><a href="http://www.careercup.com/" target="_blank">CareerCup</a>：网站似乎被G-F-W了，幸好<a href="http://www.careercup.com/rss.xml" target="_blank">RSS</a>还能用。</li>
</ul>
<p>[tags]算法,面试,题库[/tags]</p>
<div><h4>相关文章</h4><ul><li><a href="http://zhiqiang.org/blog/science/computer-science/another-perfect-shuffle-algorithm.html">Perfect Shuffle的算法</a></li><li><a href="http://zhiqiang.org/blog/science/game-two-hats.html">帽子游戏二</a></li><li><a href="http://zhiqiang.org/blog/science/googles-crazy-face-questions.html">Google的疯狂面试题</a></li><li><a href="http://zhiqiang.org/blog/it/emc-2008-10-writing-test.html">2008年10月EMC笔试</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/163-written-test-problems.html">网易笔试题</a></li><li><a href="http://zhiqiang.org/blog/science/worldquant-written-test-2007.html">WorldQuant的笔试题</a></li><li><a href="http://zhiqiang.org/blog/science/a-brain-teaser-microsoft.html">毛毛虫爬棍子面试题</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/preliminary-computer-theory-algorithms-and-calculation-model.html">理论计算机初步：算法和计算模型</a></li><li><a href="http://zhiqiang.org/blog/science/mathmatics-in-rubik-cube-and-algorithm.html">魔方里的数学</a></li><li><a href="http://zhiqiang.org/blog/science/computer-science/inverse-square-root-algorithm-analysis.html">求平方根倒数的算法</a></li></ul></div>    <p></p>
    <hr noshade style="margin:0;height:1px" />
    <p>&copy; zhiqiang for <a href="http://zhiqiang.org/blog">阅微堂</a>, 2007. | <a href="http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html">&#38142;&#25509;</a> | <a href="http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html#comments">31 &#26465;&#35780;&#35770;</a></p>]]></content:encoded>
			<wfw:commentRss>http://zhiqiang.org/blog/science/computer-science/an-algorithm-face-interviews-question-test.html/feed</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
	</channel>
</rss>

