由买买提看人间百态

topics

全部话题 - 话题: previ
1 (共1页)
k***t
发帖数: 276
1
网上看到的真题。自己写了一个答案,还算简洁,但对时间复杂度和不满意。
抛砖引玉吧。哪位来个O(n)的解?
boolean maxji (int a[], int N, int *resi, int *resj) {
int i, j, previ, maxdist, maxi;
if (!a || (N < 2) || !resi || !resj) return FALSE;
j = N-1;
while((a[j] <= a[0]) && (j != 0)) --j;
previ = 0; maxi = 0; maxdist = j - 0;
for (i = 1; i < (N-maxdist-1); ++i) {
if (a[i] >= a[previ]) continue;
previ = i; j = N-1;
while((a[j] <= a[i]) && (j != i)) --j;
if ((j - i) > maxdist) {
m... 阅读全帖
k***t
发帖数: 276
2
The main part should be functional correct. It passed my test cases. There
might be boundary cases to cover though, not sure.
Got an improved version with comparison skipping on the right side. Not an O
(n), but should be close in a normal case as lots of comparisons are indeed
skipped. For this kind of questions, if it was never seen, I would be more
than happy if I could ever reach this far in an interview:)
#include
using namespace std;
bool maxji (int a[], int N, int *resi, int *res... 阅读全帖
i****k
发帖数: 4085
3
来自主题: Military版 - 老中想斗过老印还得靠华为:
Huawei Wins LTE Contract Covering India's Karnataka
Huawei Wins LTE Contract Covering India's Karnataka
Published on: 1st May 2012
Bharti Airtel says that it has selected Huawei to plan, design, supply and d
eploy its TD LTE network in Karnataka. Under this agreement, Huawei will del
iver the LTE solution comprising of network infrastructure and devices.
Huawei has partnered with Bharti Airtel in Sri Lanka & part of Bangladesh an
d is also the 3G provider in the state of Karnataka & Tamil Nadu. ... 阅读全帖
m*****n
发帖数: 5245
4
来自主题: JobHunting版 - 关于ICC的H-1B transfer
有人问,ICC扣下了H-1B的approval notice,但transfer需要怎么办?
这里合并回答:
你可以绕过ICC,直接提交一份I-824申请给USCIS,
要求移民局给你自己寄送H-1B approval notice,也就是I-797的副本。
这里是USCIS的说明。
http://www.uscis.gov/i-824
Application for Action on an Approved Application or Petition
Purpose of Form :
To request a duplicate approval notice, to request approval notice to
another U.S. Consulate, and to request notice to a U.S. Consulate for
derivative visas to family members.
Number of Pages :
Instructions: 4; Form: 2.
Edition Date :
07/30/07. Previ
M*********8
发帖数: 15312
a********n
发帖数: 737
C****a
发帖数: 1639
7
来自主题: Stock版 - Lion 看起来不错啊
http://www.engadget.com/2011/02/28/mac-os-x-lion-hands-on-previ
Airdrop/Save version有点意思
Mac OS 10 已经有10年了吧,不知道11什么时候出来。。
v****e
发帖数: 19471
8
来自主题: Stock版 - Feb内讧了
Stocks came off their session highs Wednesday after a top Fed official said
he is against providing stimulus even if the economy worsens, opposing previ
ous comments from chairman Ben Bernanke.
c******g
发帖数: 1611
9
来自主题: Stock版 - Feb内讧了
LOL...

said
previ
w*******o
发帖数: 6125
10
来自主题: Stock版 - Feb内讧了
戏要做足,要不然P民怎么体现民主制度的伟光正

said
previ
X*********r
发帖数: 11803
11
来自主题: Stock版 - Feb内讧了
It is normal. Look at this board you will know what I meaned

said
previ
★ 发自iPhone App: ChineseWeb - 中文网站浏览器
p**********d
发帖数: 7918
12
来自主题: Stock版 - Feb内讧了
這個Fisher難道是被Bernanke授意的?Fed一般不會公開內部分歧。

said
previ
b******y
发帖数: 660
13
http://www.uscis.gov/files/form/m-274.pdf
page 22.
H-1B employees changing employers (porting)
Under the American Competitiveness Act in the Twenty-
First Century (AC-21), an H-1B employee who is chang
-
ing employers within the H-1B program may begin
working for you as soon as you file a Form I-129 petition
on his or her behalf. To qualify for AC-21 benefits, the
new petition must not be frivolous and must have been
filed prior to the expiration of the individual’s period of
authorized stay . Y... 阅读全帖
d******8
发帖数: 3017
14
来自主题: LosAngeles版 - PBS 下周节目介绍: China Week Preview
WEEKDAY ON LOCAL PBS CHANNEL Tavis Smiley show daily 11pm.
http://www.pbs.org/wnet/tavissmiley/interviews/china-week-previ
J********o
发帖数: 17447
15
来自主题: PhotoGear版 - Nikon 856 奥运照
体育帝大鸟帝来围观
http://www.leonneal.com/blog/2012/07/31/nikon-800mm-f5-6-previe
近日这支镜头的相关参数和价格爆出,售价9,937瑞士法郎(约合人民币65,352元)
a***y
发帖数: 19743
16
来自主题: Apple版 - Mac OS X Lion Hand-on
http://www.engadget.com/2011/02/28/mac-os-x-lion-hands-on-previ
a lot of screenshots
The interface contains a lot of cue from iOS.
L********8
发帖数: 248
17
来自主题: MedicalCareer版 - 有没有人申请Orthopedic Surgery
Make addandum to Banzhu
Actually there are 3 routes leading to Ortho.
1. Directly apply for Ortho residency. Very tough even for AMG. Strong "
hardware" (USMLE scores, LORs, publications, etc) and "software" (
connections, USCE etc) are must. But I heard one CMG matched last year.
2. Finish GS residency first, then apply for hand fellowship. (I don't know
GS can apply for Ortho, though GS can apply for 2-3 ys plastic surgery
fellowship). You can only do hand surgery. One of my CMG friends (previ
w*******y
发帖数: 60932
l****r
发帖数: 5317
19
【 以下文字转载自 Fashion 讨论区 】
发信人: AmberMM (Pumpkinhead), 信区: Fashion
标 题: 章小姐事件最新八卦 update (转)--有点长, 但很靠谱。。。
发信站: BBS 未名空间站 (Mon Jan 25 01:43:21 2010, 美东)
这些日子事情太多,没时间关注。比如Obama收拾华尔街了,中国收拾Google了,看了
就有点烦。但是章小姐和赵二妈的事情,却真的是very interesting的八卦肥皂剧。海
归网上都是高素质人才,基本不八卦这些事情,但是我的低级趣味永远改不了,别人不
八,我带头庸俗一下。
先说章小姐,章小姐现在正在两地分居,和那个犹太人进行艰苦的冷战,这个事实
地球人都知道。之所要冷战,据说是为争取不动产的所有权。谣言说章小姐要柏悦府(
建国门外大街2号)的产权,同时还要那哥们加州马拉步(Malibu)大房子的一半产权
(这是媒体说的,其实这个哥们房子还有很多呢,只是国内记者不知道)。章小姐显然
不太了解犹太人,犹大当年为了30个银币可以出卖耶稣,所以就是他亲爹亲妈找他要财
产,估计他也不会给的。... 阅读全帖
g********n
发帖数: 2314
20
来自主题: _GoldenrainClub版 - 八卦章小姐和赵姨娘 by 安普若(zt)
八卦章小姐和赵姨娘 by 安普若(zt) 2010-01-25 21:52:07
不得要领 2010-01-27 04:39:05 发表于搜狐焦点家居-装修总论坛-我爱我家论坛
标签: 八卦 默多克 太阳谷
这些日子事情太多,没时间关注。比如Obama收拾华尔街了,中国收拾Google了,看了
就有点烦。但是章小姐和赵二妈的事情,却真的是very interesting的八卦肥皂剧。海
归网上都是高素质人才,基本不八卦这些事情,但是我的低级趣味永远改不了,别人不
八,我带头庸俗一下。
先说章小姐,章小姐现在正在两地分居,和那个犹太人进行艰苦的冷战,这个事实
地球人都知道。之所要冷战,据说是为争取不动产的所有权。谣言说章小姐要柏悦府(
建国门外大街2号)的产权,同时还要那哥们加州马拉步(Malibu)大房子的一半产权
(这是媒体说的,其实这个哥们房子还有很多呢,只是国内记者不知道)。章小姐显然
不太了解犹太人,犹大当年为了30个银币可以出卖耶稣,所以就是他亲爹亲妈找他要财
产,估计他也不会给的。哪里像浙江那几个土财主那么大方?一给就是2个亿。所以章
... 阅读全帖
g*****9
发帖数: 4125
21
来自主题: _DC版 - DC俱乐部shifting前来报道
5DII is good enough, but it is more fun to play with film cameras.
I had a lot of fun with a few pin hole camera I made long time ago, very
little cost, but tons of fun.
You can always learn to perfect your image stitching skill in photo shop,
have you tried Auto-Blend Tool yet? I have made lots of panorama high-
resolution image using Microsoft Image Composite Editor. They are fun but
also time consuming if you want to be perfect.
Also with photoshop you can easily create images that were previ
1 (共1页)