由买买提看人间百态

topics

全部话题 - 话题: find
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
f****4
发帖数: 1359
1
找到一个对的O(N)的解法
http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=ri
This is a pretty good puzzle. You can actually find the cutoff and a
description of exactly which pairs are in the solution in less than O(N)
time, but outputting all the solutions takes O(N) time, so it doesn't help
you overall. This won't be much of a hint, but finding the cutoff point can
be done in O(sqrt(N)*log2N) time. Forgive me for not writing code, but this
gets pretty nitty-gritty in spots.
I think of the pro... 阅读全帖
f****4
发帖数: 1359
2
找到一个对的O(N)的解法
http://www.ocf.berkeley.edu/~wwu/cgi-bin/yabb/YaBB.cgi?board=ri
This is a pretty good puzzle. You can actually find the cutoff and a
description of exactly which pairs are in the solution in less than O(N)
time, but outputting all the solutions takes O(N) time, so it doesn't help
you overall. This won't be much of a hint, but finding the cutoff point can
be done in O(sqrt(N)*log2N) time. Forgive me for not writing code, but this
gets pretty nitty-gritty in spots.
I think of the pro... 阅读全帖
b*****l
发帖数: 8603
3
2007年的,不知道你们说的是不是这个。祝好。
medical ethics more than hundred cases
Sep 24th, 2007, 12:17pm
1. A 25- year old mother refused immunization for her 2-month old son. The
social worker spoke to the mother. (Important for Board examination)
Next step in management: immunization should be given for the benefit of the
child.
2. A 30-year old mother refused surgery for suspected appendicitis for her 6
-year old daughter. The social worker spoke to the mother. (Important for
Board examination)
Next step in ma... 阅读全帖
l****z
发帖数: 29846
4
Giuliani: Federal Grand Jury Would Also Find No True Bill in Mike Brown Case
December 1, 2014 - 2:31 PM
By Melanie Hunter
Rudy Giuliani, former mayor of New York City (AP)
(CNSNews.com) – Former New York City Mayor Rudy Giuliani on “Fox News
Sunday” predicted that a federal grand jury investigating the Mike Brown
shooting would “find no true bill” to indict former Ferguson, Mo., officer
Darren Wilson just like the state grand jury did.
“It's an impossible case to present to a grand jury. A feder... 阅读全帖
s****j
发帖数: 67
5
int a[maxn],b[maxn];
int find(int aleft,int aright,int bleft,int bright,int k) {
if ((aright-aleft+1)+(bright-bleft+1) cout<<"error"< return 0;
}
if (aleft>aright)
return b[bleft+k-1];
if (bleft>bright)
return a[aleft+k-1];
int amid=(aleft+aright)>>1;
int bmid=(bleft+bright)>>1;
if (a[amid]<=b[bmid])
if (k<=(amid-aleft)+(bmid-bleft)+1)
return find(aleft,aright,bleft,bmid-1,k);
else
retu... 阅读全帖
m******t
发帖数: 273
6
【 以下文字转载自 Quant 讨论区 】
发信人: myregmit (myregmit), 信区: Quant
标 题: how to do data fitting to find distribution
发信站: BBS 未名空间站 (Sat Mar 15 11:02:05 2014, 美东)
Hi,
I need to do data fitting to find the distribution of a given data.
I need to find the pdf funtion of the distribution.
I can use data fitting functions in matlab and python.
It looks like a truncated gamma.
But, how to find the paramters of the distribution ?
What if the data cannot fit the truncated gamma well ?
The QQ-plot (qunatile-qua... 阅读全帖
h******r
发帖数: 148
7
来自主题: PsychoAnalysis版 - Finding A Mental-Health Provider
The following info is provided by Aetna and Harvard Medical School
Finding A Mental-Health Provider
For a variety of reasons, it is sometimes difficult to get the treatment you
need. How do you find someone who can help you?
It is not always easy to find a mental-health provider with the right skills
or to find one you feel comfortable with. Provider schedules are sometimes
full, and you may need to make multiple phone calls before you find a provider
who has time to see you. Even then, you may
E*****m
发帖数: 25615
8
来自主题: TrustInJesus版 - NASA Finds Message From God on Mars
http://dailycurrant.com/2013/07/01/nasa-finds-message-from-god-
NASA Finds Message From God on Mars
Jul 01, 2013
NASA announced today that its Curiosity Rover has found an unambiguous
message from God written on tablets in a Martian cave.
According to an official press release two giant stone slabs the size of
small elephants were located deep inside a cavern abutting Aeolis Mons, a
large mountain.
Upon one tablet is a copy of the Ten Commandments and the text of John 3:16
written in 12 language... 阅读全帖
e****d
发帖数: 333
9
来自主题: Programming版 - linux, find command question
how to find all sub directories, where the target file lives, but no deepper
level?
for example, we have timestamp files for each directory, but we don't want
to find subfolder timestamp files any more. the files look like this
/usr/local/timestamp
/usr/local/bin/timestamp
/usr/local/lib/timestamp
/usr/name/timestamp
/media/v1/
/home/jk/
now we run a find command: find ???? timestamp
we get two files
/usr/local/timestamp
/usr/name/timestamp
all deeper level timestamps are not shown.
how to do th... 阅读全帖
m******t
发帖数: 273
10
【 以下文字转载自 Quant 讨论区 】
发信人: myregmit (myregmit), 信区: Quant
标 题: how to do data fitting to find distribution
发信站: BBS 未名空间站 (Sat Mar 15 11:02:05 2014, 美东)
Hi,
I need to do data fitting to find the distribution of a given data.
I need to find the pdf funtion of the distribution.
I can use data fitting functions in matlab and python.
It looks like a truncated gamma.
But, how to find the paramters of the distribution ?
What if the data cannot fit the truncated gamma well ?
The QQ-plot (qunatile-qua... 阅读全帖
m******t
发帖数: 273
11
【 以下文字转载自 Quant 讨论区 】
发信人: myregmit (myregmit), 信区: Quant
标 题: how to do data fitting to find distribution
发信站: BBS 未名空间站 (Sat Mar 15 11:02:05 2014, 美东)
Hi,
I need to do data fitting to find the distribution of a given data.
I need to find the pdf funtion of the distribution.
I can use data fitting functions in matlab and python.
It looks like a truncated gamma.
But, how to find the paramters of the distribution ?
What if the data cannot fit the truncated gamma well ?
The QQ-plot (qunatile-qua... 阅读全帖
x*****u
发帖数: 3419
12
http://kindlerama.com/meet-kindlefeeder-the-best-online-tool-youll-find-for-your-kindle
Meet kindlefeeder, the best online tool you’ll find for your Kindle
12.11.08 | 1 Comment
If you read a lot of online content, you need to know about Kindlefeeder,
because it will drastically improve your reading experience on the Kindle.
Kindlefeeder does two things extraordinarily well:
* It lets you pick up to 30 rss feeds from blogs, magazines, whatever
you can find online that you like to read, and it... 阅读全帖
o**********e
发帖数: 18403
13
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: onetiemyshoe (onetiemyshoe), 信区: SanFrancisco
标 题: The Rush to Find China’s Moles (转载)
发信站: BBS 未名空间站 (Tue Sep 15 11:06:23 2015, 美东)
发信人: beijingren (to thine own self be true), 信区: Military
标 题: The Rush to Find China’s Moles
发信站: BBS 未名空间站 (Tue Sep 15 10:13:31 2015, 美东)
http://www.nytimes.com/2015/09/15/opinion/the-rush-to-find-chin
Feeling besieged by China’s spies, who have had success in stealing
government and corporate trade secrets, the United States h... 阅读全帖
c******f
发帖数: 2144
14
const int size = 1024;
bitset sieve;
sieve.flip();
int finalBit = sqrt(sieve.size())+1;
for (int i=2;i if (sieve.test(i))
for(int j = 2*i;j sieve.reset(j);
Question:
In this program we set all 1024 bits as all "1"(which means 1111...111)
here we will find 2 and set all numbers like 4, 6, 8, ...,10 to 0
then find 3 and set all numbers like 6,9,12...to 0
then find 4 and set all numbers like 8,12,...to 0
until the loop is finished, we will find
l******a
发帖数: 14
15
来自主题: JobHunting版 - find kth element in n*n sorted matrix
Here is another try:
Sp=0;
Ep=n-1;
While (sp {
mid=(sp ep)/2;
Pick m[mid][mid],
walk up and right to find last column index on each row( above row mid) that
is less than m[mid][mid]
Then walk down and left to find last column index on each row( below row mid
) that is less than m[mid][mid]
Now you have separate the whole data set to 2 data set in 2n time
If first set count>k, ep=mid;
Else{ sp= mid 1;k-=count of set 1;}
}
So loop logn time! you will find the final mid associate with 2n elemen... 阅读全帖
l******a
发帖数: 14
16
来自主题: JobHunting版 - find kth element in n*n sorted matrix
Here is another try:
Sp=0;
Ep=n-1;
While (sp {
mid=(sp ep)/2;
Pick m[mid][mid],
walk up and right to find last column index on each row( above row mid) that
is less than m[mid][mid]
Then walk down and left to find last column index on each row( below row mid
) that is less than m[mid][mid]
Now you have separate the whole data set to 2 data set in 2n time
If first set count>k, ep=mid;
Else{ sp= mid 1;k-=count of set 1;}
}
So loop logn time! you will find the final mid associate with 2n elemen... 阅读全帖
o**********e
发帖数: 18403
17
来自主题: JobHunting版 - The Rush to Find China’s Moles (转载)
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: onetiemyshoe (onetiemyshoe), 信区: SanFrancisco
标 题: The Rush to Find China’s Moles (转载)
发信站: BBS 未名空间站 (Tue Sep 15 11:06:23 2015, 美东)
发信人: beijingren (to thine own self be true), 信区: Military
标 题: The Rush to Find China’s Moles
发信站: BBS 未名空间站 (Tue Sep 15 10:13:31 2015, 美东)
http://www.nytimes.com/2015/09/15/opinion/the-rush-to-find-chin
Feeling besieged by China’s spies, who have had success in stealing
government and corporate trade secrets, the United States h... 阅读全帖
c****i
发帖数: 625
18
Here are your priorities:
1, build your product
2, find your first paid customer yourself
3, find your first 100 paid customers yourself
4, if you can scale to million dollars business, then worry about finding a
white guy
Finding a white guy at the beginning puts you in the path for failure.
R********s
发帖数: 3420
19
来自主题: Immigration版 - How Editors Find and Choose Reviewers (ZZ)
http://www.elsevier.com/wps/find/reviewershome.reviewers/ru_iss
Did you ever wonder how editors decide who they should ask to review their
articles?
We all know that reviewing takes time and with the ever increasing number of
papers published each year, editors have been striving to find a better,
faster, more effective way to find and keep reviewers.
To address this pain point, a new feature - The Find Reviewers Tool - was
launched in EES (Elsevier’s online submission and peer review system) in... 阅读全帖
o**********e
发帖数: 18403
20
【 以下文字转载自 SanFrancisco 讨论区 】
发信人: onetiemyshoe (onetiemyshoe), 信区: SanFrancisco
标 题: The Rush to Find China’s Moles (转载)
发信站: BBS 未名空间站 (Tue Sep 15 11:06:23 2015, 美东)
发信人: beijingren (to thine own self be true), 信区: Military
标 题: The Rush to Find China’s Moles
发信站: BBS 未名空间站 (Tue Sep 15 10:13:31 2015, 美东)
http://www.nytimes.com/2015/09/15/opinion/the-rush-to-find-chin
Feeling besieged by China’s spies, who have had success in stealing
government and corporate trade secrets, the United States h... 阅读全帖
t***u
发帖数: 3711
21
【 以下文字转载自 Automobile 讨论区 】
发信人: thhou (小小猕猴桃), 信区: Automobile
标 题: Help me find Chirstina Marie Cooper (转载)
发信站: BBS 未名空间站 (Mon Nov 3 15:26:36 2014, 美东)
发信人: thhou (小小猕猴桃), 信区: PennySaver
标 题: Help me find Chirstina Marie Cooper
发信站: BBS 未名空间站 (Mon Nov 3 15:21:16 2014, 美东)
Chirstina Marie Cooper
DOB 04/07/1991
508 N OTTAWA ST Saint JOHNS MI 48879-1224
Phone 989-307-5283
Driver License B320115585xxx
xxxxxxxxxxx
Accident date 08/28/14
She failed to stop on a local street. Hit the back of my... 阅读全帖
l***n
发帖数: 731
22
来自主题: WashingtonDC版 - where to find TOEFL materials ? (转载)
【 以下文字转载自 Faculty 讨论区 】
发信人: learn (红秋叶), 信区: Faculty
标 题: where to find TOEFL materials ? (转载)
发信站: BBS 未名空间站 (Mon Aug 10 16:05:20 2009, 美东)
发信人: learn (红秋叶), 信区: Family
标 题: where to find TOEFL materials ? (转载)
发信站: BBS 未名空间站 (Mon Aug 10 14:56:05 2009, 美东)
发信人: learn (红秋叶), 信区: Reunion
标 题: where to find TOEFL materials ?
发信站: BBS 未名空间站 (Mon Aug 10 14:54:21 2009, 美东)
Where to find training materials for TOEFL listening and reading?
any online ?
a*****a
发帖数: 1085
23
我和领导之间互相査一下的话,应该用这个find my iPhone 就可以了吧。我看有人给
那个find my friends评价说不方便査家庭成员,因为只能用一个apple ID登陆。俺就
不明白为啥不直接用find my iPhone
r******n
发帖数: 170
24
来自主题: Linux版 - 问个关于find 的问题
想简单写个命令,加到cronjob里去,主要就是在某个文件夹下面找过期的文件和子文
件夹,然后删除,但是不能删除这个文件夹本身。比如说,我是这么写的
“ find /proj/tmp/* -mtime +10 | xargs rm -rf ”
问题是,假如这个文件夹为空,系统总是会报错说
“find: /proj/tmp: No such file or directory”
假如我把最后那个星号去掉,改为
“find /proj/tmp/ -mtime +10 | xargs rm -rf”
结果,假如有文件在那个文件夹下,find又会把/proj/tmp这个目录返回,所以把/proj
/tmp/那个目录给删了,很郁闷。
哪位给点建议,咋写阿?多谢了!
L***e
发帖数: 42
25
Hi, as we use "ls -li" we can see file inode and their number of links.
But how do we find out which files are linked to htis same inode?
for example:
I have a file with inode of: 12345
and I can see there are 3 links (hardlinked)
I guess symbolic link doesn't count on the link number. If I am wrong, correct
me.
How do I find out which other files are of inode 12345? Does find support
find filenames with inode as input? How?
Thanks.
m****r
发帖数: 141
26
【 以下文字转载自 JobHunting 讨论区 】
发信人: mitcar (mitcar), 信区: JobHunting
标 题: An interview question of finding the median in a moving window.
发信站: BBS 未名空间站 (Thu Mar 22 09:53:07 2012, 美东)
This is an interview question. The interview has been done.
Given a sequence of data (it may have duplicates), a fixed-sized moving
window, move the window at each iteration from the start of the data
sequence, such that
(1) the oldest data element is removed from the window and a new data
element is pushed into the wi... 阅读全帖
m******t
发帖数: 273
27
Hi,
I need to do data fitting to find the distribution of a given data.
I need to find the pdf funtion of the distribution.
I can use data fitting functions in matlab and python.
It looks like a truncated gamma.
But, how to find the paramters of the distribution ?
What if the data cannot fit the truncated gamma well ?
The QQ-plot (qunatile-quantile) show that it is not a good fit for truncated
gamma.
How to find the distribution parameters such as alpha (shape), beta (scale)
for the truncated g... 阅读全帖
w*******y
发帖数: 60932
28
Kmart has
Rubbermaid Easy Find Lids 40-Piece Storage Set:
http://www.kmart.com/shc/s/p_10151_10104_011W822130110001P
for $14.99
Use Code OFFERS10 for 10% off
Final Price $13.49
Select pick up in store to save on shipping
Walmart $18.54:
http://www.walmart.com/ip/Rubbermaid-40-Piece-Easy-Find-Lid-Foo
Amazon $21.37:
http://www.amazon.com/Rubbermaid-Easy-Find-Storage-40-Piece/dp/
Rubbermaid Easy Find Lid Food Storage Set:
40-piece food storage set
Five 0.5-cup containers with lids
Five 1.25-cup c... 阅读全帖
u****p
发帖数: 25
29
来自主题: _Funding版 - How to find program directors of DOD?
It is very easy to find the information of the program directors of NSF, as
they are clearly listed on their website. However, I cannot find the
information of the program directors of DOD or division directors of AFOSR,
ARO, or ONR. For example, I like to find those who are interested in optical
networks and sensors networks. Anyone knows how to find their information?
Thanks!
n******6
发帖数: 1829
30
【 以下文字转载自 WaterWorld 讨论区 】
发信人: powershadow (鲍鱼○英语好好玩), 信区: WaterWorld
标 题: ipad被盗通过Find my iphone找到俩女贼zz
发信站: BBS 未名空间站 (Wed Apr 6 11:31:12 2011, 美东)
ipad被盗通过Find my iphone找到俩女贼zz
被盗事件经过:ipad 3G
本人在义乌国际商贸城一区市场经商,2011年4月5日清明节,据说今天是黄道吉日,看
起来真的好吉利。
下午13:15左右,我在玩刚买的x-plane for ipad,这时进来兩女的,一个顺眼的,一
个丑的,我把ipad放在了桌子上。她们站在门口看样品,看起来是想拿货的,就在那里
谈。
过了一会那丑点的走过店内桌子边上坐下了,这时我背对她站在门口与顺眼的在交谈,
我也没有起疑,太疏忽了。过了一会那丑的偷到ipad后,兩人放下样品就匆忙离开,我
把样品挂回去后,坐回桌子边才发现ipad没了。
赶紧出去找这兩人,转了一圈她们早已经没影了(逼我买ipad2吗)。这时想到设置过
find my iphon... 阅读全帖
o*****e
发帖数: 551
31
Surprise to find such info.
UN FINDS CREDIBLE TIES BETWEEN ISIS AND ISRAELI DEFENSE FORCES at least a
year a go.
http://www.infowars.com/un-finds-credible-ties-between-isis-and
g**1
发帖数: 10330
32
http://www.amazon.com/Chinese-Wife-Guide-Model-Type-Girlfriend-ebook/dp/B01LLNL90Y
Chinese Wife Guide: How to Find a Model-Type Chinese Girlfriend or Wife
Kindle Edition
by Julian Bernard Stiles (Author)
This book is a must-have for anyone who wants to have a top-notch, model-
type Chinese girlfriend or marry a such a girl.
Chinese women are, in my opinion, the best in the world, with common, highly
-valuable and sought-after qualities such as slim & hot body types,
beautiful faces, frugality, f... 阅读全帖
l****z
发帖数: 29846
33
In a stunning finding, Accenture asserts in a new survey of consumer
behavior that traditional television viewership is experiencing a wholesale
collapse.
The survey, the results of which are being released Monday, just as the 2012
International Consumer Electronics Show gets underway in Las Vegas, finds
that the number of consumers who watch broadcast or cable television in a
typical week plunged to 48% in 2011 from 71% in 2009. The same survey, which
canvased about 1,000 consumers in each of 1... 阅读全帖
l****z
发帖数: 29846
34
Florida Dems Can’t Find Voters to Protest Allen West, so They Hire Some
March 28, 2012
by Warner Todd Huston
Democrats and the left are inherently a sham with little actual grassroots
support and the race for Florida’s 18th Congressional District is yet
another example of this truism.
Repeatedly and across the country we see unions, Democrats, and other far
left groups planning rallies and protest marches but finding that they
simply can’t put bodies in the streets to make all the effort worthwh... 阅读全帖
t***u
发帖数: 3711
35
来自主题: Automobile版 - Help me find Chirstina Marie Cooper (转载)
【 以下文字转载自 PennySaver 讨论区 】
发信人: thhou (小小猕猴桃), 信区: PennySaver
标 题: Help me find Chirstina Marie Cooper
发信站: BBS 未名空间站 (Mon Nov 3 15:21:16 2014, 美东)
Chirstina Marie Cooper
DOB 04/07/1991
508 N OTTAWA ST Saint JOHNS MI 48879-1224
Phone 989-307-5283
Driver License B320115585xxx
xxxxxxxxxxx
Accident date 08/28/14
She failed to stop on a local street. Hit the back of my SUV. Polic report
( Crash ID # 9027763). The Police knew she has no insurance on that day but
did not let me know.
I tried to ca... 阅读全帖
l***n
发帖数: 731
36
来自主题: Faculty版 - where to find TOEFL materials ? (转载)
【 以下文字转载自 Family 讨论区 】
发信人: learn (红秋叶), 信区: Family
标 题: where to find TOEFL materials ? (转载)
发信站: BBS 未名空间站 (Mon Aug 10 14:56:05 2009, 美东)
发信人: learn (红秋叶), 信区: Reunion
标 题: where to find TOEFL materials ?
发信站: BBS 未名空间站 (Mon Aug 10 14:54:21 2009, 美东)
Where to find training materials for TOEFL listening and reading?
any online ?
r****c
发帖数: 2585
37

this is N logk
In order to find in O(N), you need to find the kth number in O(N) which is a
simple extension of finding median in O(N)
r****o
发帖数: 1950
38
【 以下文字转载自 InterviewHackers 俱乐部 】
发信人: roufoo (五经勤向窗前读), 信区: InterviewHackers
标 题: The time complexity on finding the kth largest element in a
发信站: BBS 未名空间站 (Tue Jun 1 22:42:09 2010, 美东)
We can use the partition() in qsort. Each time, we can partition the array
into two parts, array_a and array_b. Let the number of elements in array_a
and array_b be sa and sb, respectively.
If sa is smaller than k, then find the (k-sa)th largest element in array_b;
If sa is larger than or equal to k, then find
c***n
发帖数: 921
39
来自主题: JobHunting版 - Finding deepest node of BST ?
Finding deepest node of tree??
Here is a solution:
- First to find the height of the tree.(do it recursively, O(n) time)
- Then traverses through each node, find the current depth and compare
it with the maxDepth.
- If condition satisfied, print out the item stored in the node.
这是最好方法么?
m**q
发帖数: 189
40
Looks like an old question, but failed to find a better solution than O(klg(
m+n)). Any ideas?
The question is quoted from a comment on ihas1337code website
------
1.Two reverse sorted arrays A and B have been given. such that size of A is
m and size of B is n
You need to find the k th largest sum (a+b) where a is taken from A and b is
taken from B. such that k < m*n It can be done in O(n*n) but i believe it
can be done in a very efficient way. I heard someone say there is a paper
from SODA. I... 阅读全帖
S****h
发帖数: 558
41
It is a small bay area IT firm. They asked first how to find 10 most
frequent strings from 10 billion (string, frequency) pairs. Easy, use heap
O(10^9*log10). Then they asked the second question.
How to find 10 most frequent strings in 10 billion string list?
Not much idea. I answered to sweep once to build (string,frequency) pair
and then sweep again to find the first 10. Is there any better way?
a***r
发帖数: 93
42

yes, it is a bug, fixed, thanks for pointing it out, should have used calloc in the first place.
The algorithm should work:
If sum(from i to j)==0, then sum(0....i-1) should equal to sum(0...j)
setup an array B, such that B[i]=A[0]+...+A[i]
if A[i]+...+A[j]==0 then B[i-1]==B[j];
so only needs to find if there are duplicate items in B.
binary sort B, find duplicates, if exists then return true;
otherwise return false;
welcome to find more bugs.
k***t
发帖数: 276
43
来自主题: JobHunting版 - Find LeastCommonAncestor for N-ary Tree
写了一个,没测试。谁给Review一下。谢了。
===========================================
#include
#include
#define N 100
struct Node {
int val;
int nC; // Num of Children
Node *c[N]; // Children
};
bool hasP=false, hasQ=false;
Node * doLCA (Node *r, Node *p, Node *q) {
Node *first=NULL, *second=NULL;
assert(p&&q);
if (!r) return NULL;
if (p==r) {hasP=true; return r;}
if (q==r) {hasQ=true; return r;}
for (int i=0;inC;i++) {
Node *t=doL... 阅读全帖
m****r
发帖数: 141
44
This is an interview question. The interview has been done.
Given a sequence of data (it may have duplicates), a fixed-sized moving
window, move the window at each iteration from the start of the data
sequence, such that
(1) the oldest data element is removed from the window and a new data
element is pushed into the window
(2) find the median of the data inside the window at each moving.
My idea:
Use 2 heaps to hold median. In side the window, sort the data in the window
in the first iteration, ... 阅读全帖
b**y
发帖数: 13
45
实现代码:
// build hashtable hset
//遍历hset, 判断每个单词是不是复合词
string FindLongestCompositeWord ()
{
uint32 max_word_length = 1; //No composite word length of 1
string longestCompWord ;
hash_set ::iterator hs1_pIter;
for ( hs1_pIter = hset.begin( ); hs1_pIter != hset.end( ); hs1_pIter++ )
{
if (IsCompositeWord(*hs1_pIter))
{
output_word_list.push_back(*hs1_pIter);
if (max_word_length < ((string)*hs1_pIter).length() )
{
max_word_lengt... 阅读全帖
b**y
发帖数: 13
46
实现代码:
// build hashtable hset
//遍历hset, 判断每个单词是不是复合词
string FindLongestCompositeWord ()
{
uint32 max_word_length = 1; //No composite word length of 1
string longestCompWord ;
hash_set ::iterator hs1_pIter;
for ( hs1_pIter = hset.begin( ); hs1_pIter != hset.end( ); hs1_pIter++ )
{
if (IsCompositeWord(*hs1_pIter))
{
output_word_list.push_back(*hs1_pIter);
if (max_word_length < ((string)*hs1_pIter).length() )
{
max_word_lengt... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)