<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>阅微客栈: 最新主题</title>
<link>http://zhiqiang.org/bbs/</link>
<description>阅微客栈: 最新主题</description>
<language>en</language>
<pubDate>Thu, 04 Dec 2008 22:38:15 +0000</pubDate>

<item>
<title>zhang 在 "Amazon面试题：八个球中找出重量不同的一个"</title>
<link>http://zhiqiang.org/bbs/topic/20#post-37</link>
<pubDate>星期三, 09 May 2007 05:06:06 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">37@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;八个球，其中七个重量一样。现在给一个没有刻度的天平，怎么找出重量不一样的那一个？
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "求运算次数 - 百度面试题"</title>
<link>http://zhiqiang.org/bbs/topic/73#post-250</link>
<pubDate>星期二, 23 Sep 2008 05:30:23 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">250@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;简述：实现一个函数，对一个正整数n,算得到1需要的最少操作次数：&#60;/p&#62;
&#60;p&#62;如果n为偶数，将其处以2；&#60;/p&#62;
&#60;p&#62;如果n为奇数，可以加1或减1；&#60;/p&#62;
&#60;p&#62;一直处理下去。&#60;/p&#62;
&#60;p&#62;求最小运算次数。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "找缺失的数"</title>
<link>http://zhiqiang.org/bbs/topic/58#post-152</link>
<pubDate>星期三, 12 Sep 2007 14:18:57 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">152@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;An array A[1...n] contains all the integers from 0 to n except one. In this problem, we cannot access an entire integer in A with a single operation. The elements of A are represented in binary, and the only operation we can use to access them is &#34;fetch the jth bit of A[i]&#34;, which takes constant time. Find the missing integer in O(n) time.
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "给一些不同的正整数和ｍ，求所有ａ，ｂ使得ａ＋ｂ＝ｍ"</title>
<link>http://zhiqiang.org/bbs/topic/76#post-255</link>
<pubDate>星期四, 09 Oct 2008 00:43:07 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">255@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;排序后查找　O(n\log n).&#60;/p&#62;
&#60;p&#62;空间换时间，使用ｍ长数组标记数是否出现过，不计算分配空间消耗的时间外，复杂度为　O(n).
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "构造最小深度树"</title>
<link>http://zhiqiang.org/bbs/topic/77#post-256</link>
<pubDate>星期四, 09 Oct 2008 00:44:43 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">256@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;已知一颗无向无环连通图T的所有顶点和边的信息，现需要将其转换为一棵树，要求树的深度最小，请设计一个算法找到所有满足要求的树的根结点，并分析时空复杂度（描述算法即可，无需代码）&#60;/p&#62;
&#60;p&#62;算法：两次深度优先求出Ｔ的直径，直径中间的两点即为所求。
&#60;/p&#62;</description>
</item>
<item>
<title>king 在 "关于STL里重排数组算法random_shuffle()"</title>
<link>http://zhiqiang.org/bbs/topic/71#post-248</link>
<pubDate>星期一, 07 Jul 2008 12:42:14 +0000</pubDate>
<dc:creator>king</dc:creator>
<guid isPermaLink="false">248@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;源码如下：&#60;br /&#62;
template &#38;lt;class RandomAccessIterator, class Distance&#38;gt;&#60;br /&#62;
void __random_shuffle(RandomAccessIterator first, RandomAccessIterator last,&#60;br /&#62;
                      Distance*) {&#60;br /&#62;
  if (first == last) return;&#60;br /&#62;
  for (RandomAccessIterator i = first + 1; i != last; ++i)&#60;br /&#62;
#ifdef __STL_NO_DRAND48&#60;br /&#62;
    iter_swap(i, first + Distance(rand() % ((i - first) + 1)));&#60;br /&#62;
#else&#60;br /&#62;
  iter_swap(i, first + Distance(lrand48() % ((i - first) + 1)));&#60;br /&#62;
#endif&#60;br /&#62;
}&#60;/p&#62;
&#60;p&#62;这里的iter_swap(i, first + Distance(rand() % ((i - first) + 1)));能否保证数组是均匀的重排呢？&#60;br /&#62;
如何保证？
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "求一个缺失的数"</title>
<link>http://zhiqiang.org/bbs/topic/74#post-251</link>
<pubDate>星期二, 23 Sep 2008 05:31:41 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">251@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给你很多很多数（32位整数），求一个不在这些数里的数（亦为32位整数）
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "找重复的数 - MSRA面试题"</title>
<link>http://zhiqiang.org/bbs/topic/75#post-252</link>
<pubDate>星期二, 23 Sep 2008 05:33:26 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">252@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;题目是这样的，给定一个包含4300000000个32位整数的顺序文件，请问如何找到一个至少出现两次的整数？&#60;/p&#62;
&#60;p&#62;顺序文件，不允许随机访问。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "据说是google的电面题目"</title>
<link>http://zhiqiang.org/bbs/topic/40#post-101</link>
<pubDate>星期一, 09 Jul 2007 03:49:02 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">101@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;算法题一：Given 1 GB memory, input a file which contians 4 billion integers,&#60;br /&#62;
output one integer that is not in the file. What if you have only 10 MB&#60;br /&#62;
memory?&#60;/p&#62;
&#60;p&#62;算法题二：There are 100 hundred sorted arrays, and each of them contains 100&#60;br /&#62;
numbers. Give an algorithm to merge them into a single sorted array, using&#60;br /&#62;
only one temporary array in the middle steps.&#60;/p&#62;
&#60;p&#62;编程题：Input an integer array of size n and an integer k (k&#38;lt;=n), output all&#60;br /&#62;
subsets of size k.
&#60;/p&#62;</description>
</item>
<item>
<title>szuxjq 在 "魔方相邻格子能否不同色？"</title>
<link>http://zhiqiang.org/bbs/topic/69#post-234</link>
<pubDate>星期六, 26 Apr 2008 04:22:09 +0000</pubDate>
<dc:creator>szuxjq</dc:creator>
<guid isPermaLink="false">234@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;从原始的一面一色状态的魔方，能否扭转到任两相邻格子都是不同的颜色呢？
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "微软面试题 - 找路径条数"</title>
<link>http://zhiqiang.org/bbs/topic/46#post-124</link>
<pubDate>星期二, 14 Aug 2007 01:25:34 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">124@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;在一个由向无圈图中，查找给定的两节点之间的有向路径的条数。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "Amazon面试题 - 找最短的cover"</title>
<link>http://zhiqiang.org/bbs/topic/38#post-97</link>
<pubDate>星期三, 27 Jun 2007 06:03:10 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">97@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;Given two arrays A [1..n] and B[1..m], find the smallest window in A that contains all elements of B. That is, find a pair &#38;lt;l,k&#38;gt; such that A[l..k] contains B[1..m] For example, given A = 3,1,5,7,3,5,2 and B = 5,3 then the smallest window is [3,5].
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "算法 - 旋转数组"</title>
<link>http://zhiqiang.org/bbs/topic/47#post-125</link>
<pubDate>星期二, 14 Aug 2007 01:30:10 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">125@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给一个n元数组 &#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_53fd294956c125200888c950a8c4e9fd.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;x_1, x_2, \cdots, x_n&#34; /&#62;，和k，使用常熟空间和线性时间，使得数组变成 &#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_195308498404d4a079aa1a7089a9ea47.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;x_k,x_{k+1}, \cdots, x_n, x_1, \cdots, x_{k-1}&#34; /&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>zhiqiang 在 "尺规作图问题"</title>
<link>http://zhiqiang.org/bbs/topic/70#post-241</link>
<pubDate>星期六, 24 May 2008 02:22:17 +0000</pubDate>
<dc:creator>zhiqiang</dc:creator>
<guid isPermaLink="false">241@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给你一个三角形ABC，请用圆规和尺找出点P，保证三角形ABP、ACP和BCP周长相等&#60;br /&#62;
。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "判断一个图是否为一个二叉树"</title>
<link>http://zhiqiang.org/bbs/topic/59#post-153</link>
<pubDate>星期三, 12 Sep 2007 14:19:55 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">153@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;一个图是否具有一个二叉树结构。
&#60;/p&#62;</description>
</item>
<item>
<title>king 在 "自然数按一定运算变为1的运算次数"</title>
<link>http://zhiqiang.org/bbs/topic/61#post-161</link>
<pubDate>星期四, 27 Sep 2007 08:16:01 +0000</pubDate>
<dc:creator>king</dc:creator>
<guid isPermaLink="false">161@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;自然数变化规则：&#60;br /&#62;
偶数：除以2&#60;br /&#62;
奇数：加1或者减一&#60;br /&#62;
直到运算结果为1，程序终止！&#60;br /&#62;
例如：&#60;br /&#62;
7  +1  =8&#60;br /&#62;
8  /2  =4&#60;br /&#62;
4  /2  =2&#60;br /&#62;
2  /2  =1  结束&#60;br /&#62;
运算次数为4次&#60;br /&#62;
当然所求的次数应该是最小的！！！！
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "求部分有序的数列的中位数"</title>
<link>http://zhiqiang.org/bbs/topic/62#post-164</link>
<pubDate>星期五, 05 Oct 2007 04:08:58 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">164@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;一个&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_607acaa73c762411b20745149a11e90b.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;n\times n&#34; /&#62;的矩阵数列，若此序列每一列都是增序的，求这&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_6595d679e306a127a3fe53268bcaddb2.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;n^2&#34; /&#62;个数的中位数。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "算法 - 均分数组"</title>
<link>http://zhiqiang.org/bbs/topic/49#post-127</link>
<pubDate>星期二, 14 Aug 2007 01:37:54 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">127@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给一个数组，将它们分为两部分，平均值相等。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "数组中元素和最接近于0的子数组"</title>
<link>http://zhiqiang.org/bbs/topic/67#post-202</link>
<pubDate>星期五, 29 Feb 2008 01:13:11 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">202@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;数组中元素有正有负，如何求元素和最接近于0的子数组
&#60;/p&#62;</description>
</item>
<item>
<title>szuxjq 在 "How to in-place right-rotate a two dimensional array?"</title>
<link>http://zhiqiang.org/bbs/topic/68#post-222</link>
<pubDate>星期六, 12 Apr 2008 05:01:06 +0000</pubDate>
<dc:creator>szuxjq</dc:creator>
<guid isPermaLink="false">222@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;某知名网站的讨论，&#60;br /&#62;
For example, given a MxN (3x4) two dimensional array&#60;/p&#62;
&#60;p&#62;1, 2, 3, 4&#60;br /&#62;
5, 6, 7, 8&#60;br /&#62;
9,10,11,12&#60;/p&#62;
&#60;p&#62;You need to rearrange it into:&#60;/p&#62;
&#60;p&#62;9 , 5, 1,&#60;br /&#62;
10, 6, 2,&#60;br /&#62;
11, 7, 3,&#60;br /&#62;
12, 8, 4&#60;/p&#62;
&#60;p&#62;Write a function to do it in-place. &#60;/p&#62;
&#60;p&#62;e.g. M=3, N=4, and a memory block contains:&#60;br /&#62;
[1,2,3,4,5,6,7,8,9,10,11,12]&#60;/p&#62;
&#60;p&#62;You need to change the memory block into&#60;br /&#62;
[9,5,1,10,6,2,11,7,3,12,8,4]&#60;/p&#62;
&#60;p&#62;&#34;In-place&#34; means memory constaint is O(1).
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "面试题 - 旋转排序数组的二分查找"</title>
<link>http://zhiqiang.org/bbs/topic/48#post-126</link>
<pubDate>星期二, 14 Aug 2007 01:32:06 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">126@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;在一个旋转过的有序数组（比如3 4 5 1 2）上实现二分查找。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "微软面试题：重排0，1数组"</title>
<link>http://zhiqiang.org/bbs/topic/51#post-134</link>
<pubDate>星期三, 22 Aug 2007 02:17:44 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">134@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;BM: you are given an array of integers containing only 0s and 1s. you have to place all the 0s in even position and 1s in odd position and if suppose no. of 0s exceed no. of 1s or vice versa then keep them untouched. Do that in ONE PASS and WITHOUT taking EXTRA MEMORY.&#60;/p&#62;
&#60;p&#62;input array:&#60;br /&#62;
{0 1 1 0 1 0 1 0 1 1 1 0 0 1 0 1 1 }&#60;br /&#62;
output array:&#60;br /&#62;
{0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 }
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "算法：下一个2进制数"</title>
<link>http://zhiqiang.org/bbs/topic/52#post-135</link>
<pubDate>星期三, 22 Aug 2007 02:29:28 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">135@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给你一个二进制的n位数，求上一个和下一个数，使得有相同个数的1。
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "算法：求0，1矩阵的最大连续全1块"</title>
<link>http://zhiqiang.org/bbs/topic/53#post-137</link>
<pubDate>星期五, 31 Aug 2007 00:55:02 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">137@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给一个&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_252d3754c0db62a55b9e25c870a524a5.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;n\times m&#34; /&#62;的0，1矩阵，求它的面积最大的全1子块。&#60;/p&#62;
&#60;p&#62;要求&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_9f84a66d88d24c3b1bc91df5b5346a13.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;O(n^2)&#34; /&#62;时间。&#60;/p&#62;
&#60;p&#62;提示：&#60;a href=&#34;http://zhiqiang.org/bbs/topic/23&#34;&#62;http://zhiqiang.org/bbs/topic/23&#60;/a&#62;
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "微软面试题－怎么在同一个数组里面实现３个stack？"</title>
<link>http://zhiqiang.org/bbs/topic/11#post-14</link>
<pubDate>星期五, 04 May 2007 05:14:29 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">14@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;怎么在同一个数组里面实现３个stack，并且最有效率？&#60;/p&#62;
&#60;p&#62;How to implement 3 stacks in a single array as efficiently as possible ??
&#60;/p&#62;</description>
</item>
<item>
<title>mryoung 在 "bbPress发送密码的Email如何设置？"</title>
<link>http://zhiqiang.org/bbs/topic/66#post-200</link>
<pubDate>星期一, 04 Feb 2008 18:34:33 +0000</pubDate>
<dc:creator>mryoung</dc:creator>
<guid isPermaLink="false">200@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;如题！&#60;/p&#62;
&#60;p&#62;附：真希望主人能分享一下贵bbPress的代码？
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "测试 - 数学公式，图片等"</title>
<link>http://zhiqiang.org/bbs/topic/1#post-1</link>
<pubDate>星期三, 02 May 2007 08:11:35 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">1@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;第一帖! 喔.&#60;/p&#62;
&#60;p&#62;用$$a+b=c$$生成&#60;br /&#62;
&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_c6d223eafd71470302a8b78e6d137648.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;a+b=c&#34; /&#62;&#60;/p&#62;
&#60;pre&#62;&#60;img /&#62;&#60;/pre&#62;
&#60;p&#62;&#60;img src=&#34;http://lh3.google.com/image/mathzqy/RJVnPhngABE/AAAAAAAAAGA/nB58QjvIz28/PPMM.jpg?imgmax=160&#38;#38;crop=1 &#34; /&#62;&#60;/p&#62;
&#60;p&#62;test latex &#60;center&#62;&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_6d168bf791ae7264421e7ec0d2068202.png&#34; align=&#34;absbottom&#34; class=&#34;tex&#34; alt=&#34;\alpha+\beta\geq\gamma&#34; /&#62;&#60;/center&#62; img
&#60;/p&#62;</description>
</item>
<item>
<title>zhang 在 "判断n个数是否为全排列"</title>
<link>http://zhiqiang.org/bbs/topic/22#post-47</link>
<pubDate>星期一, 28 May 2007 09:26:39 +0000</pubDate>
<dc:creator>zhang</dc:creator>
<guid isPermaLink="false">47@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;给一个n长的数组，判断它是否为一个&#60;img src=&#34;http://zhiqiang.org/bbs/bb-cache/tex_af484e1d0bcc1bbf09843188deddc4e8.png&#34; align=&#34;absmiddle&#34; class=&#34;tex&#34; alt=&#34;1, 2, \cdots, n&#34; /&#62;的全排列，要求在线形时间，常数空间内实现。
&#60;/p&#62;</description>
</item>
<item>
<title>szuxjq 在 "直方图的最大内接矩形"</title>
<link>http://zhiqiang.org/bbs/topic/23#post-48</link>
<pubDate>星期二, 29 May 2007 14:18:40 +0000</pubDate>
<dc:creator>szuxjq</dc:creator>
<guid isPermaLink="false">48@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;据说有这么一道题：求直方图的最大内接矩形,假设每个细条的宽度为1。
&#60;/p&#62;</description>
</item>
<item>
<title>zhongnanhai 在 "测试，这BBPRESS还不行啊，没上传附件的功能"</title>
<link>http://zhiqiang.org/bbs/topic/65#post-186</link>
<pubDate>星期二, 20 Nov 2007 15:25:57 +0000</pubDate>
<dc:creator>zhongnanhai</dc:creator>
<guid isPermaLink="false">186@http://zhiqiang.org/bbs/</guid>
<description>&#60;p&#62;想整合一个出来玩玩，可惜&#60;/p&#62;
&#60;ul&#62;&#60;a href=&#34;http://www.zhongnanhai.info&#34; rel=&#34;nofollow&#34;&#62;http://www.zhongnanhai.info&#60;/a&#62;&#60;/ul&#62;</description>
</item>

</channel>
</rss>
