由买买提看人间百态

topics

全部话题 - 话题: subset
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
e********0
发帖数: 259
1
求完整证明,每问20个包子。
Let (S,||.||) be a normed verctor space of continuous functions on interval
[a,b] with uniform norm (sup norm). Is the following subset of S closed?
Prove it or give a counterexample.
a, the subset of strictly increasing functions in S
b, the subset of weakly increasing functions in S.
a*********3
发帖数: 660
2
定义 definition变量 variable面积 area直径 diameter半径 radius公式 formula
单价 unit price范围 range/scope/extent集合 set法则 principle本金 principal利
率 interest rate利息 interest单利 simple interest复利 compound interest正数
positive number负数 negative number解析式 analytic expression分类讨论
classified discussion性质 nature (不是很确定)奇函数 odd function偶函数
even function对称 symmetric坐标原点 origin单调性 monotonicity(不是很确定)
任意 random周期性 periodic 有界性 boundedness 数学 mathematics, maths(BrE)
, math(AmE) 公理 axiom 定理 theorem 计算 calculation 运算 operat... 阅读全帖
b*****d
发帖数: 7166
3
来自主题: Mathematics版 - 一个组合问题
x_1, x_2, ..., x_n是从{1,2,...,N}中抽取的一个不含重复的subset,即所有x_i都不
相同。
求 f(n)=1/(N+1)!*SUM_{对所有可能subset}x_1*x_2*...*x_n,就是要对所有可能的无
重复subset的连乘求和。
对任意N和n,可能没有closed form解。但这里感兴趣的是N趋于无穷时f(n)的
asymptotic behavior。
谢谢!
我在这里有更清楚的表述
http://mathoverflow.net/questions/154668/summation-of-products-
b***k
发帖数: 2673
4
来自主题: Quant版 - [合集] a problem
☆─────────────────────────────────────☆
Allens (ffff) 于 (Mon Jan 18 21:16:40 2010, 美东) 提到:
Consider a cartesian product over n given finite sets,
X=X1×X2×。。。×Xn
Try to prove that X cannot be partitioned into less than 2^n subsets,
each of which is in form of Y1×Y2×。。。×Yn, Y1...Yn are proper subsets
of X1...Xn, respectively.
☆─────────────────────────────────────☆
netghost (Up to Isomorphism) 于 (Wed Jan 20 07:37:21 2010, 美东) 提到:
Let's say there is a particular subset with the form
Z1 X
d*z
发帖数: 150
5
来自主题: Science版 - Re: 请 教 统 计 专 家(solution)
I can give u an example in which the answer is 0.5.
First Lets split the domain into 8 subset.
A1={(u,v,w)|u>=0&&v>=0&&w>=0}&U
A2={(u,v,w)|u>=0&&v>=0&&w<0}&U
...
where U means u in [-1,1] & v in [-1,1] & w in [-1,1].
And suppose in each subset, the distribution is completely
uniform.
And given a sample, the possiblity that it in subset A1 is
p1, and in A2 is p2,etc. I will gives and table in the
following.
set |u v w | Euv Euvww | possibility
A1 |+ + + | .25 1/12 |
S******y
发帖数: 1123
6
来自主题: Statistics版 - How to selectively plot data in R
I have a R data frame.
I would like to selectively plot certain rows of data (e.g. State =
'CA')
But I would not like to use subset. The reason is that I have to do it
many times on different values of select variable (e.g., State= 'CA',
and also State = 'AZ', and also State = 'FL' respectively, etc. )
Is there a way to do this via avoiding subset (i.e., physically creating
the subset of data satisfying the select condition)?
Many thanks!
h*******d
发帖数: 272
7
谢谢您的回复
但。。还是很迷糊
比如 我对新生成的5组数据+原始数据分别作BEST SUBSET or STEPWISE regression 分
析 得到6组结果
然后看哪些变量最常常被这6组结果选中 就取出这些变量做我的SUBSET PREDICTOR 然
后我想做REGRESSION MODEL.
但是 然后怎样呢? 我虽然知道了 SUBSET 但我还是要面对6组数据啊
到底最后怎样得到我的regression model 呢
f*********g
发帖数: 632
8
来自主题: Statistics版 - 请问一个开问题的例子与用处
Application:Robust statistics
fit two-dimensional plane to higher-dimensional data points
insensitive to large number of arbitrary outliers
Problem:Given a set of n points in two-dimensional plane
Find three subsets s.t. any line passes outside at least one subset
Want each subset to contain as many points as possible
能举个例子吗?
这个在统计上到底有什么具体应用?
c***z
发帖数: 6348
9
来自主题: Statistics版 - need help on bias correction
Hi all,
Does anyone have experience in bias correction? I am working on a project
and the initial result was bad. I would really really appreciate any help!
Here is the details:
Business objective: Correct for panel bias in terms of demographic breakdown
, to obtain an accurate multiplier, in order to calculate site traffic,
sales, etc
Input data:
1. Site visits by people (own data, company Q);
2. Third party (C) 2000 site gender decomposition;
3. Third party personal gender labels (two... 阅读全帖
c***z
发帖数: 6348
10
【 以下文字转载自 DataSciences 讨论区 】
发信人: chaoz (面朝大海,吃碗凉皮), 信区: DataSciences
标 题: [Data Science Project Case] Bias Correction - third try
发信站: BBS 未名空间站 (Tue Feb 11 18:26:40 2014, 美东)
Dear all, thank you so much for your earlier inputs! Now I am able to put my
thoughts together and understand the project better.
Let me write down the thing again. Any comments are extremely welcome!
Project name: Bias correction
Business objective: We have a panel of 25M users’ shopping cart information
, we want to in... 阅读全帖
f**d
发帖数: 768
11
来自主题: Neuroscience版 - eBook: From computer to brain
这是一本计算神经科学的优秀著作,全文拷贝这里(图和公式缺),有兴趣的同学可以
阅读
如需要,我可以分享PDF文件(--仅供个人学习,无商业用途)
From Computer to Brain
William W. Lytton
From Computer to Brain
Foundations of Computational Neuroscience
Springer
William W. Lytton, M.D.
Associate Professor, State University of New York, Downstato, Brooklyn, NY
Visiting Associate Professor, University of Wisconsin, Madison
Visiting Associate Professor, Polytechnic University, Brooklyn, NY
Staff Neurologist., Kings County Hospital, Brooklyn, NY
In From Computer to Brain: ... 阅读全帖
c***z
发帖数: 6348
12
来自主题: DataSciences版 - [Data Science Project Case] Bias Correction
Just did a second round and it was way off.
Here is what I did. Any input is extremely welcome!
Business objective: Correct for panel bias in terms of demographic breakdown
, to obtain an accurate multiplier, in order to calculate site traffic,
sales, etc
Input data:
1. Site visits by people (own data, company Q);
2. Third party (C) 2000 site gender decomposition;
3. Third party personal gender labels (two companies, E and L);
Technical logic:
1. Assign a score to sites based on thei... 阅读全帖
c***z
发帖数: 6348
13
Dear all, thank you so much for your earlier inputs! Now I am able to put my
thoughts together and understand the project better.
Let me write down the thing again. Any comments are extremely welcome!
Project name: Bias correction
Business objective: We have a panel of 25M users’ shopping cart information
, we want to infer national online sales by brand and channel. We do so by
finding and applying multipliers to each shopping cart item, based on our
panel size and selection bias towards partic... 阅读全帖
c**i
发帖数: 6973
14
来自主题: ChinaNews版 - Machine Tools
James Simms, Japan's Capital Dilemma. Wall Street Journal, July 8, 2011 (
title in print)
http://online.wsj.com/article/SB1000142405270230354460457643190
("one message from Japanese core machinery order data for May[;] A subset of
the overall data, foreign machinery orders, is actually heading south, with
month-on-month declines in the past three months. That dropped 6.6% in May
alone. And year-on-year increases have been slowing for the past four months
too. This indicates a slowdown in oversea... 阅读全帖
L******f
发帖数: 5368
15
来自主题: Military版 - 党准备要全面开征房产税了?
美国的Mobile Home。
Mobile homes are often sited in land lease communities known
as trailer parks. Also referred to as trailer courts, mobile
home parks, mobile home communities, manufactured home communities,
and factory built home communities, these communities allow
home owners to rent space on which to place a home.
In addition to providing space, the community can provide
basic utilities such as water, sewer, electricity, or natural
gas and other amenities such as garbage removal, community
roo... 阅读全帖
l**1
发帖数: 1875
16
来自主题: Faculty版 - 本版杜绝无证据的人身攻击
// Algorithm that accepts the NP-complete language SUBSET-SUM.
//
// this is a polynomial-time algorithm if and only if P=NP.
//
// "Polynomial-time" means it returns "yes" in polynomial time when
// the answer should be "yes", and runs forever when it is "no".
//
// Input: S = a finite set of integers
// Output: "yes" if any subset of S adds up to 0.
// Runs forever with no output otherwise.
// Note: "Program number P" is the program obtained by
// writing the integer P in binary, then
// consi... 阅读全帖
a***r
发帖数: 981
17
☆─────────────────────────────────────☆
amour (amour) 于 (Sun Feb 3 00:14:28 2013, 美东) 提到:
仅此删贴警告, 如再有同类情况, 3天内不得发帖.
☆─────────────────────────────────────☆
jingang (jingang) 于 (Sun Feb 3 02:32:13 2013, 美东) 提到:
应该的。有些急功近利的手段见不得光,但是烙印老美干类似的事情的人只多不少。
WSN们只会在自己人身上动刀,真无聊。

☆─────────────────────────────────────☆
lot1 (花开花落知多少) 于 (Sun Feb 3 10:22:35 2013, 美东) 提到:
如果讲的是事实,就应该发表。我们都是科学家,应该有科学精神。
你同样没有证据证明别人说的话是错误的。
你不要自以为是,照样把你人肉出来
☆─────────────────────────────────────☆
digua (姚之FA... 阅读全帖

发帖数: 1
18
来自主题: Faculty版 - Jan's lab : 这里有弟子么?

Download pdf published by SfN (Chapter from 'The History of Neuroscience in
Autobiography, Volume 8' edited by Larry R. Squire)
Yuh-Nung Jan's CV
Lily Jan's CV
Yuh-Nung Jan and Lily Jan
Birth
Family History and Growing Up
National Taiwan University
The Hiking Trip to Shitou in the Spring of 1967
Graduate School Application
Graduate Study at Caltech (1968锟974)
Seymour Benzer Lab (1974锟977)
Steve Kuffler锟絪 Lab at H... 阅读全帖
x***y
发帖数: 633
19
来自主题: JobHunting版 - 问2道面试题
Your program is to check whether the prefix of s1 is the string "prefix",
but what that guy said is to check whether the string "prefix" is in the
string "s1".
For the second problem, it's the subset sum problem, a special case of 0-1
knapsack problem and you can find the subset by tracing back the table...
It's pseudo-polynomial algorithm, which runs as O(n*Sum), where n is the length of
a...Tracing back table cost O(n) time...
//below just my program, probably not the best
//the key part of it
k***e
发帖数: 556
20
来自主题: JobHunting版 - 问一道算法题
放什么飞机?npc也搞出来了。
In computer science, the partition problem is an NP-complete problem. The
problem is to decide whether a given multiset of integers can be partitioned
into two "halves" that have the same sum. More precisely, given a multiset
S of integers, is there a way to partition S into two subsets S1 and S2 such
that the sum of the numbers in S1 equals the sum of the numbers in S2?
如果可以多项式时间解决楼主的问题,只要m取2,看得到的subset summation是否等于
sum/2,就可以回答该set是否能够partition的query?
麻烦大侠以后能贴点靠谱的题目。
g*******y
发帖数: 1930
21
来自主题: JobHunting版 - 一道图论算法题
找一条路径?不是回路?
可以用subset sum归约吧
假设有一条链,每条边的weight就是subset sum问题中数组的每个数,然后任意两个顶
点之间,如果没有边,就用一个weight=0的边连接。
q***e
发帖数: 474
22
来自主题: JobHunting版 - 贡献两道Bloomberg面试题
上个月在学校面的,第一题是找出一串数当中最大的subset,比如2,-1,0,10,-5.
最大的subset就是2,-1,0,10.怎么找出来
第二题是local variable和globalvariable有啥区别。
我第一题回答的挺屎的,后来没下文了,我推测是挂了。
今天竟然又神奇般的收到Bloomberg的email让我去网上做题,太诡异了,估计不记得曾
经面试过我。打算再做题试试,死马当做活马医。
q***e
发帖数: 474
23
来自主题: JobHunting版 - 贡献两道Bloomberg面试题
这道题先说思路。
比如例子里头有5个数,就先找到所有subset的可能,就是5+4+3+2+1=15.如果是N个数
那就是N+(N-1)+...+1=N*(N+1)/2。
然后比较这些subset的和,找出最大的那个。
其实挺简单一道题,当时脑子反应比较迟钝。。。
s******a
发帖数: 103
24
来自主题: JobHunting版 - 贡献两道Bloomberg面试题
If they are all negative, then the maxiSum is 0. The subset we are looking
for is the empty set, which is a subset of any set.
I**********s
发帖数: 441
25
来自主题: JobHunting版 - Google点面
问了1) 研究, 2) 多线程程序设计, 3) 任意无穷字符串流, 内存有限, 找出唯一一对
重复字符串, 这个我说了哈希表和外部排序, 但是面试人说有更好的办法(后来想也许
是bloom filter), 然后追问外部排序的细节到结束. 估计要挂 :(
总结: 面试既是技术活, 又是运气活.
无论如何, 把我的准备工作放下面, 攒点rp, 希望对大家有所帮助.
Interview Qs
Data Structures
1. Integer
- find number of 1s
- next largest smaller
- smallest larger number
- determine if is palindrom
- itoa, atoi
- add 2 numbers w/o using + or arithmetic operators
- implement *, -, / using only +
- find max of two numbers w/o co... 阅读全帖
z****n
发帖数: 1379
26
来自主题: JobHunting版 - 这个题咋做?
用二进制
比如10011就是n=5,k=3的一种情况,相当于取第1个,第4个,和第5个构成subset

subsets
e*****e
发帖数: 1275
27
是subarray 还是 subset.
subset 是个经典DP的题目。
subarray 就算i到n的sum好了~~然后用hash table
g**********y
发帖数: 14569
28
来自主题: JobHunting版 - 问一道题(1)
嗯,你说得对,这点我忽视了,找到最接近点之后,应该比两个subset average差值,
不是比avg(subset)-avg
x****3
发帖数: 62
29
刚拿到书, 还没看. 题是从http://www.crackingthecodinginterview.com考的. 感觉跟第4版差别不大.
Chapter 1 Arrays and Strings
1.1 Unique Characters in String
1.2 Reverse String in C
1.3 Check Permutation
1.4 Replace Spaces
1.5 String Compression
1.6 Rotate Image / Matrix
1.7 Set Row or Column to 0
1.8 Check Rotation Using isSubstring
Chapter 2 Linked Lists
2.1 Remove Duplicates
2.2 Find kth to Last Element
2.3 Delete Node from Middle
2.4 Partition List
2.5 Add Two Lists
2.6 Get Front of Loop in Circular List
2.7 Check ... 阅读全帖
x****3
发帖数: 62
30
刚拿到书, 还没看. 题是从http://www.crackingthecodinginterview.com考的. 感觉跟第4版差别不大.
Chapter 1 Arrays and Strings
1.1 Unique Characters in String
1.2 Reverse String in C
1.3 Check Permutation
1.4 Replace Spaces
1.5 String Compression
1.6 Rotate Image / Matrix
1.7 Set Row or Column to 0
1.8 Check Rotation Using isSubstring
Chapter 2 Linked Lists
2.1 Remove Duplicates
2.2 Find kth to Last Element
2.3 Delete Node from Middle
2.4 Partition List
2.5 Add Two Lists
2.6 Get Front of Loop in Circular List
2.7 Check ... 阅读全帖
j********x
发帖数: 2330
31
照你本来题目的描述,其实是个很简单的问题
这个题目的描述跟subset sum其实是不同的,你这里是subarray,而不是subset
S**I
发帖数: 15689
32
☆─────────────────────────────────────☆
gzou (gzou) 于 (Thu May 12 02:26:35 2011, 美东) 提到:
马上就要G on site了,
求祝福。
下面是从本版收集到的Google的试题,便于大家查询。
申明:有的附带有解释说明的,也来自于本版或者网络,大家自己看, 不保证真确
http://www.mitbbs.com/article_t1/JobHunting/31847453_0_1.html
本人ECE fresh PhD,背景是电路/EDA,跟G业务基本没什么关系
同学内部推荐的,很简单的一次电面就给了onsite
题都不难,但是自己没把握好机会,出了一些小bug。
总的感觉,出错就是硬伤,宁可从最简单的算法写起,也不能出错。
电面:
1,Skip list, http://en.wikipedia.org/wiki/Skip_list
写code实现struct skip_list * find(struct skip_list *head, int value)
2,sorted array... 阅读全帖
S**I
发帖数: 15689
33
☆─────────────────────────────────────☆
gzou (gzou) 于 (Thu May 12 02:26:35 2011, 美东) 提到:
马上就要G on site了,
求祝福。
下面是从本版收集到的Google的试题,便于大家查询。
申明:有的附带有解释说明的,也来自于本版或者网络,大家自己看, 不保证真确
http://www.mitbbs.com/article_t1/JobHunting/31847453_0_1.html
本人ECE fresh PhD,背景是电路/EDA,跟G业务基本没什么关系
同学内部推荐的,很简单的一次电面就给了onsite
题都不难,但是自己没把握好机会,出了一些小bug。
总的感觉,出错就是硬伤,宁可从最简单的算法写起,也不能出错。
电面:
1,Skip list, http://en.wikipedia.org/wiki/Skip_list
写code实现struct skip_list * find(struct skip_list *head, int value)
2,sorted array... 阅读全帖
c**********e
发帖数: 2007
34
来自主题: JobHunting版 - Another DP Problem: Balanced Partition
•Balanced Partition:
Given a set of n integers, each in the range 0 ... K, partition the integers
into two subsets to minimize |S1 - S2|, where S1 and S2 denote the sums of
the elements in each of the two subsets.
j****a
发帖数: 1277
35
来自主题: JobHunting版 - 问一道L家的题
这个怎么做啊 如果p是m的subset 那我觉得挺难的 有2^n subsets

code
w****x
发帖数: 2483
36
来自主题: JobHunting版 - 今天做了挺难的一道题, 分享一下

1,3,4,5,-4,0,0 求所有和等于0的subset, subset不能重复
4, -4, 0
4, -4
4, -4, 0, 0
0
0, 0
v****c
发帖数: 29
37
来自主题: JobHunting版 - 请教最优算法:最多装满水的桶?
我的意思就是subset sum有DP解
但是3-partition没有,所以可以从3-partition做reduction,而不从subset sum做
3-partition是strongly NPC,就算所有数字都有范围,也没polynomial算法
f*****k
发帖数: 65
38
来自主题: JobHunting版 - L家onsite悲剧 贡献个面经吧
第一轮简历,问的比较细,包括一些设计,结果应该不错,因为走的时候那个人说good
starting
第二轮简历,比第一个还细,应该是一个很牛的人,说以前的系统的时候,居然找出了
以前系统设计的漏洞(在大数据量时,但是那个系统没有那么大的数据量。。。),这
一轮估计有点问题,虽然那个人说没关系,以前系统有漏洞不影响你今天的表现,关键
是我们能不能找出问题再解决掉,走的时候说good luck
第三轮coding,binary tree,实现三个函数,1.把树写到文件,2.再读回来,3.再比
较前后两棵树是不是一样。这轮应该也没问题,那个走的时候说good job
第四轮coding,三个问题,第一个是找一个integer array里面的sum最大的连续子序列
;第二个问题,3 sum的变形,给一个integer set,给一个sum,找出set里面和等于
sum的所有subset(不能生成所有subset再比较,我的做法就是加一些trim的条件);第
三题,老题,给一个string,在给一个char的set,找出string里面的一个最短
substring,包括char set里面所... 阅读全帖
t******e
发帖数: 98
39
来自主题: JobHunting版 - 问一道微软的面试题-被难到了。
写个思路抛砖引玉了。
a[2*N]表示文件大小数组,设f(int[] a, int set, int k)表示状态,set是一个
binary integer表示a[]的一个子集,k表示将a[]的这个子集分成k份,状态转移方程是
f(a[], set, k) = min{ max{sum(a[]: for element a[i] in a subset set' of set
), f(a, set - set', k-1)}: for all subset set' of set }. 边界条件是f(a[],
set, 1) = sum(a[]: for elements a[i] in set). 解法的限制是N不能太大(<=10),
否则内存吃不消。
h*****3
发帖数: 1391
40
来自主题: JobHunting版 - 问一到题目
Re。
求subset,然后算每个subset的sum,肯定可以。不过不知道是不是最优。
e****e
发帖数: 418
41
来自主题: JobHunting版 - 01 Knapsack brute force code
The idea is to explore all the combinations of weights array by masking and
bit shifting.
i.e. v1=5 w1=3, v2=3 w2=2, v3=4 w3=1, we form the two arrays as follows:
values[5, 3, 4], weights[3, 2, 1], W = 5.
for weights array[3, 2, 1], we want the all subsets of the elements.
such as:
[](no element)
[1]
[2]
[3]
[1 2]
[1 3]
[2 3]
[1 2 3]
We can get this subsets by masking bit by bit if we think of the array
bitwise.
[3 2 1]
0 0 0 -> (no element)
0 0 1 -> [1]
0 1 0 -> [2]
1 0 0 -> [3]
1 0 1 ... 阅读全帖
b****e
发帖数: 45
42
来自主题: JobHunting版 - 周末上道小题
对每个subset S, 判断是否符合如下条件:
Sum(S)能被Size(S)整除。
然后找出size最大的那个subset应该就是答案了。
证明过程:
假设最后达成相等的所有元素集合为S,其中的元素值为x. 则S中的元素是由一部分初始
值大于等于X的子集(假设为S1)向剩余初始值小于x的子集(假设为S2)进行"重分配"得
到的。因此这样的集合需满足如下条件:
Sum(S1) - |S1|x = |S2|x - Sum(S2)
即:
x = [Sum(S1) + Sum(S2)] / (|S1| + |S2|) = Sum(S) / |S|
结果为整数即可。
f*****e
发帖数: 2992
43
就说都有用,但是应用领域或处理的问题不同,而你在研究过程中只是碰到这些proble
ms的一个subset,所以你发现那些针对这个特定subset的知识和技能有用,但是你不确
定是否将来是否碰到新问题,可能你掌握了的但是现在没有用到的将来可能有用。
p*****2
发帖数: 21240
44
来自主题: JobHunting版 - 两道题目
def dfs(arr, start, buf)
p buf if buf.length>0
(start...arr.length).each do |i|
buf< dfs(arr,i+1,buf)
buf.pop
end
end
def subset(arr)
buf=[]
dfs(arr,0,buf)
end
subset([1,2,3])
j*****y
发帖数: 1071
45
来自主题: JobHunting版 - 一道面试题:三等分数组
s1 是第一个 subset, s2 是第二个 subset ?
x 和 xs 是什么呢?
d**e
发帖数: 6098
46
☆─────────────────────────────────────☆
travelodge (travelodge) 于 (Fri Aug 31 00:46:34 2012, 美东) 提到:
总觉得山寨淘宝的research scientist很鸡肋, 工资跟sde一样,但基本不
发paper,
这样怎么来评定该不该升级。 不发paper又不经常写code那就等于没法跳槽,万一被裁
员别家的research scientist还是看paper的吧。
至于山寨百度的SDE(T4), 又担心他们家高手如云, 很难升级, 会不会做万年sde(最多
升到5)
钱上其实账目上差不多, 扣掉免税州的低房价, 不过淘宝少了很多福利
对于fresh phd来说
RSII: 125k + 40k sign-on /2 + 55k RSU / 4 = 158.75K
SDE 127k + 15% bonus + 160 RSU/4 = 170K
有没有过来人给点建议。。。。
面经,记不清了 
山寨淘宝/京东
onsite有个job talk,
然后有五六轮聊天面试吧,题目... 阅读全帖
b*******e
发帖数: 217
47
来自主题: JobHunting版 - phone interview question
give a polynomial complexity algorithm to find whether a set of intergers
can be evenly divided into 3 subsets. that is: if sum of the set is A,
decide whether it can be divided into 3 subsets, each with sum = A/3.
c**c
发帖数: 74
48
来自主题: JobHunting版 - 算法面试题
面试题,感觉是下面believeme 的升级版。
give a polynomial complexity algorithm to find whether a set of intergers
can be evenly divided into 3 subsets. that is: if sum of the set is A,
decide whether it can be divided into 3 subsets, each with sum = A/3.
大意是,
两组整数A,B,没有排序, 长度分别为m,n,A中数是体积,B中数是容积大小
比如将A,B排序后,得到 比如 A= {17,16,16,13,12,7,4,3,2,1}
B={27,23,19,17,4,2,1}
A 中有17,4,3,1, B有27。那么,
27=17
27=17+4+3
27=17+4+3+1
把A中的数往B中放, 有什么方法能让放入B的数尽可能balance, A中的数如果放不到B
中可以不放。
有什么解法?
NP-complete,又近似的优化解法吗
R**y
发帖数: 72
49
来自主题: JobHunting版 - 攒RP,ZocDoc 面经
ZocDoc是一个不错的公司。市场前景不错,没有对手。
Skype Interview,一个亚裔小伙,人很nice,题目也不难
Reverse Linked List.
我开始用stack实现,结果返回的head是为null,初始化赋值的地方出错
Node result = null;
Node head = result; // 这个地方,即时将来result 会赋上新值,head依然为null。
然后处理头节点的时候,没有将其的next赋为空。。。。
接着一看不行,用for loop 直接做,返回值又弄错了,返回了是反转结果的最后一个
节点。。。。
no.2 打印一个string所有可能的subset的anagram,
这道题饿做错了,我只打印了当前字符串所有可能的anagram,而且面试官没看出来我
错了,他也误以为是只打印所有anagram。
这道题如果要打印所有subset的 anagram,我觉得至少O(2^n),字串就有这么多。。。
攒个RP,这是第二个电面,发现如果做新题,很容易慌,直接就容易跪,即使能做出来
也经常出这样那样的小bug,需要面试官带着才能做对
----... 阅读全帖
R**y
发帖数: 72
50
来自主题: JobHunting版 - 攒RP,ZocDoc 面经
大牛,能解释一下,到底有多少个subset么? 我觉得应该是2^n个,然后每个subset找
出所有permutation。
首页 上页 1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)