i**p 发帖数: 940 | 1 发信人: ericz (不认识eric zhou), 信区: SanFrancisco
标 题: Re: lawrence上面距离el camino不远那片玉米地在建房子
发信站: BBS 未名空间站 (Sat Jan 26 23:40:29 2013, 美东)
对.这个说的太对了
94086, 94087情况比较复杂。东边的那快,不管是94086还是94087初中高中都不好。小
学水平差别不大,我觉得94086 Ponderosa elem(就是这些新房子附近)那快反倒好些,
至少交通好。
西边的学区相对东边都好些. 但94087更好. 94087有一小块最好,是west valley elem
/cupertino middle/homestead high. 94086有一小快是94086中最好的,是
cumberland ele/sunnyvale middle/homestead high. |
|
i**p 发帖数: 940 | 2 发信人: ericz (不认识eric zhou), 信区: SanFrancisco
标 题: Re: lawrence上面距离el camino不远那片玉米地在建房子
发信站: BBS 未名空间站 (Sat Jan 26 23:40:29 2013, 美东)
对.这个说的太对了
94086, 94087情况比较复杂。东边的那快,不管是94086还是94087初中高中都不好。小
学水平差别不大,我觉得94086 Ponderosa elem(就是这些新房子附近)那快反倒好些,
至少交通好。
西边的学区相对东边都好些. 但94087更好. 94087有一小块最好,是west valley elem
/cupertino middle/homestead high. 94086有一小快是94086中最好的,是
cumberland ele/sunnyvale middle/homestead high. |
|
g****a 发帖数: 81 | 3 from my own house searching experience,
Wilchester area (77079):
* from Kirkswood further west - zoned to Wilchester Elem (10/10), but bad mid and high school
* from Kirkswood to Wilcrest Dr - zoned to Wilchester Elem, Memorial Mid (10/10), and Stratford (9/10)
* from Wilcrest to Sam Houston - mostly zoned to Rummel Creek (9/10), Memorial Mid, Stratford; only a very small portion south of Memorial Drive is zoned to Memorial High School (9/10 but better than Stratford)
77024 area...
Good school z... 阅读全帖 |
|
s****y 发帖数: 18685 | 4 http://www.ksl.com/?nid=148&sid=15670212
KSL rankings show where Utah schools stand
May 23rd, 2011 @ 11:21pm
By Nadine Wimmer
SALT LAKE CITY — Students all over Utah are taking their year-end state
tests in reading and math. While the scores won't be out until fall, KSL has
a new tool that can show parents where things stand right now.
KSL, The Deseret News and Deseret Digital Media have teamed up to show
parents how their school compares to others in the state. These CRT test
scores don't show ... 阅读全帖 |
|
x**********g 发帖数: 146 | 5 准备在richmond的westend买一个townhouse, 最近看中了2个,
一: Towns at Shady Grove $298,500
year built: 2005
1900 square feet
Elem School: Rivers Edge
Midd School: Short Pump
High School: Deep Run
二: The Townes At Meredith Creek $299,900
year built: 2004
2100 square feet
Elem School: Longan
Midd School: Hungary Creek
High School: Tucker
非常喜欢2的结构,但是据说1的学区要好很多, 非常犹豫, 不知道该下哪个offer.
我现在还没小孩, 所以学区对我来说不是那么重要, 但是考虑到resale的价格, 是不是该
考虑好的学区呢?
还有一个问题就是价格一般还有多少negotiate的余地呢? 2个房子都po |
|
s****u 发帖数: 118 | 6 int n = 4;
int elems[] = { 1, 2, 3, 4 };
for (int i = 0; i < (1 << n); ++i) {
for (int k = 0; k < n; ++k) if (i & (1 << k)) {
// outputs elems[k]...
}
}
4
,
std
it
and I just |
|
C******a 发帖数: 32 | 7 thrust, 请指出我的语法错误, 谢谢!
I am thinking about sth like but does not compile:
template
class LongestSubstr
{
..................
public:
void operator() (int elem)
{
if (Compare_lessequal(current, elem))
{
.....
}
....
}
};
int main()
{
...................
LongestSubstr() > |
|
d****j 发帖数: 293 | 8 Essential C++ 第二章介绍了如何使用function pointer,我试了了一下,想获取一个
定义好的function pointer array的长度,却怎么也搞不定,请指教。
具体的问题是,有5中sequence,如fibonacci序列,squared序列,等等,假设有下列5
个对应的function,输入参数为 int size,返回一个size长度的const vector;
const vector* fibon_seq(int);
const vector* lucus_seq(int);
const vector* pell_seq(int);
const vector* triang_seq(int);
const vector* square_seq(int);
再有一个从一个vector中取出第n个元素的函数,参数为pos,要取的数字的位置,elem,
引用,存储返回值,fp,第三个是function pointer,具体如下:
bool seq_elem(int pos, int& elem, co... 阅读全帖 |
|
a9 发帖数: 21638 | 9 node_link = node.find('link') or node.find('showlink')
node是一个xml ElementTree里的一个Element
现在有个警告
FutureWarning: The behavior of this method will change in future versions.
Use specific 'len(elem)' or 'elem is not None' test instead. |
|
g****t 发帖数: 31659 | 10 杩欎釜鍔炴硶涓嶉敊馃憤
璋㈣阿鎸囩偣
銆鍦Leiss(寰曞徃) 鐨勫ぇ浣滀腑鎻愬埌: 銆br />
: LEGB scoping rule
: 鍏蜂綋瀹炶返涓婏紝鍙互鍦local 鍐嶅紩鐢ㄤ竴娆global
: 姣斿鏍囧噯搴撻噷鐨勫皬椤跺爢瀹炵幇閲岀殑鍑犲彞锛br />
: https://hg.
python.org/cpython/file/2.7/Lib/heapq.py#l215
: _heappushpop = heappushpop
: for elem in it:
: _heappushpop(result, elem)
: 杩欓噷 heappushpop 鏄彟澶栦竴涓嚱鏁帮紝鍦global scope
: 濡傛灉鐩存帴鏀for 寰幆閲岋紝姣忔閮藉緱鍏lookup local scope锛br />
: 鍐嶆煡 enclosed 鍜global scope锛屽氨鎱簡銆br />
|
|
b******8 发帖数: 55 | 11 1. Phosphorus, Sulfur Silicon and Relat. Elem., 1993, 81, 141-148
2. Phosphorus, Sulfur Silicon and Relat. Elem., 1995, 102, 211-215 |
|
a******e 发帖数: 119 | 12 前段时间受了不少R运算速度太慢的折磨。做了点research 知道了点皮毛,抛砖引玉,
大家讨论一下。
1、Vectorization
for (i in …)
{
for (j in …) { dframe <- func(dframe,i,j)
}
}
这样的结构对R来说是个disaster。可以考虑ecterization
e.g. Instead of explicit element-by-element loop for
(i in 1:N) { A[i] <- B[i] + C[i] }
invoke the implicit elem.-by-elem. Operation: A <- B + C
2、用apply instead of looping
这个似乎有争议,有的说apply不能提高R的速度。不过,至少apply可以让你的code看
上去更简洁
3、Functional programming:
exp1:Filter(f, x) – Returns the elements of x for which f is true
> x
... 阅读全帖 |
|
i**z 发帖数: 194 | 13 参照 R cookbook 里面有不少 tips.
另外, lapply 可能会快点, sapply 和 loop 其实差不多。
前段时间受了不少R运算速度太慢的折磨。做了点research 知道了点皮毛,抛砖引玉,
大家讨论一下。
1、Vectorization
for (i in …)
{
for (j in …) { dframe <- func(dframe,i,j)
}
}
这样的结构对R来说是个disaster。可以考虑ecterization
e.g. Instead of explicit element-by-element loop for
(i in 1:N) { A[i] <- B[i] + C[i] }
invoke the implicit elem.-by-elem. Operation: A <- B + C
2、用apply instead of looping
这个似乎有争议,有的说apply不能提高R的速度。不过,至少apply可以让你的code看
上去更简洁
3、Functional programming:
exp1:Filter(f,... 阅读全帖 |
|
g*******t 发帖数: 1039 | 14 I agree with you that it seems like dead cat bounce. But who knows!
BTW, for those who with elem. school age kids - all 3 good elem. schools in
Almaden vally are full, very good chance is that if you buy now, your kids
will have to go to a crappy school with dominant % mo-mo kids. |
|
d******r 发帖数: 4 | 15 【 以下文字转载自 Military 讨论区 】
发信人: docluver (docluver), 信区: Military
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Wed Jan 5 11:02:40 2011, 美东)
发信人: docluver (docluver), 信区: WaterWorld
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Wed Jan 5 11:02:10 2011, 美东)
UCLA开放课程:中国的兴与衰 Fall and Rise of China
中国的兴与衰
(这是网上找到的最全的集合,欲下从速,删除后不再重新上传)
更多纪录片、教学视频请访问:http://www.docwiki.org
Course No. 8370 (48 lectures, 30 minutes/lecture)
Taught by Richard Baum
University of California, L... 阅读全帖 |
|
w******3 发帖数: 3 | 16 【 以下文字转载自 WaterWorld 讨论区 】
发信人: wmz55123 (wmz55123), 信区: WaterWorld
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Fri Jan 7 08:38:40 2011, 美东)
UCLA开放课程:中国的兴与衰 Fall and Rise of China
中国的兴与衰
(这是网上找到的最全的集合,欲下从速,删除后不再重新上传)
更多纪录片、教学视频请访问:http://www.docwiki.org
Course No. 8370 (48 lectures, 30 minutes/lecture)
Taught by Richard Baum
University of California, Los Angeles
Ph.D., University of California, Berkeley
下载链接:
http://www.fileserve.com/file/yYZSm8c/01- The Splendor That Was China... 阅读全帖 |
|
w******3 发帖数: 3 | 17 【 以下文字转载自 Military 讨论区 】
发信人: wmz55123 (wmz55123), 信区: Military
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China (转载)
发信站: BBS 未名空间站 (Fri Jan 7 08:41:36 2011, 美东)
发信人: wmz55123 (wmz55123), 信区: ChinaNews
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Fri Jan 7 08:40:11 2011, 美东)
发信人: wmz55123 (wmz55123), 信区: WaterWorld
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Fri Jan 7 08:38:40 2011, 美东)
UCLA开放课程:中国的兴与衰 Fall and Rise of China
中国的兴与衰
(这是网上找到的最全的集合,欲下从速,删除后不再重新上传)
更... 阅读全帖 |
|
|
d******r 发帖数: 4 | 19 【 以下文字转载自 WaterWorld 讨论区 】
发信人: docluver (docluver), 信区: WaterWorld
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Wed Jan 5 11:02:10 2011, 美东)
UCLA开放课程:中国的兴与衰 Fall and Rise of China
中国的兴与衰
(这是网上找到的最全的集合,欲下从速,删除后不再重新上传)
更多纪录片、教学视频请访问:http://www.docwiki.org
Course No. 8370 (48 lectures, 30 minutes/lecture)
Taught by Richard Baum
University of California, Los Angeles
Ph.D., University of California, Berkeley
下载链接:
http://www.fileserve.com/file/yYZSm8c/01- The Splendor That Was China... 阅读全帖 |
|
w******3 发帖数: 3 | 20 【 以下文字转载自 ChinaNews 讨论区 】
发信人: wmz55123 (wmz55123), 信区: ChinaNews
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Fri Jan 7 08:40:11 2011, 美东)
发信人: wmz55123 (wmz55123), 信区: WaterWorld
标 题: UCLA开放课程:中国的兴与衰 Fall and Rise of China
发信站: BBS 未名空间站 (Fri Jan 7 08:38:40 2011, 美东)
UCLA开放课程:中国的兴与衰 Fall and Rise of China
中国的兴与衰
(这是网上找到的最全的集合,欲下从速,删除后不再重新上传)
更多纪录片、教学视频请访问:http://www.docwiki.org
Course No. 8370 (48 lectures, 30 minutes/lecture)
Taught by Richard Baum
University of California,... 阅读全帖 |
|
M***s 发帖数: 8769 | 21 VEHICLES AFFECTED
2003–06 Accord V6 – ALL
2007 Accord 2-door V6 A/T:
From VIN 1HGCM82..7A000001 thru
1HGCM82..7A004921
2007 Accord 2-door V6 M/T:
From VIN 1HGCM81..7A000001 thru
1HGCM81..7A007683
2007 Accord 4-door V6 A/T:
From VIN 1HGCM66..7A000001 thru
1HGCM66..7A102801
2007 Accord 4-door V6 M/T:
From VIN 1HGCM65..7A000001 thru
1HGCM65..7A083251
2005–06 Accord Hybrid – ALL
2007 Element 2WD: ALL
2008 Element 2WD:
From VIN 5J6YH18..8L000001 thru
5J6YH18..8L015906
2007 Element 4WD: ALL
2008 Eleme |
|
y******8 发帖数: 38 | 22 2bed/1bath Condo For Rent Walk to Lindbergh Center Marta Station
Incredible Location!! Walk To Lindbergh Marta Station. The Second Floor Unit
Boasts Hardwood Floors, Granite Counter Tops And Great Storage Space.
Includes Cable, Water And Gas In Monthly Rent!!! Lots Of Greenspace On
Property. Furnished. Won't Last Long!
5-Minute Walk To Marta, Shopping And Restaurants. Easy Access To I-75, I-85,
And GA 400.
15 mins to GSU and Emory, 10 mins to GATECH. 5 mins to Lenox Mall. 15 mins
to Perimeter... 阅读全帖 |
|
f******g 发帖数: 70 | 23 4BR/3BA with a bonus room in East Cobb location! Excellent School district
with POPE High, Hightower Middle, and Mountain view Elem. Recently
renovated basement could be used as in-law suite or older teen retreat.
Close to Aquatic Center, art place, library, and shopping. Plenty of storage
. Newer baths and carpet. Professionally cleaned house waiting for you to
move in. 6-8 months lease term considered. $30 application fee per adult.
$1375/month.
Call or text Elain at 954-604-1836
Email tina... 阅读全帖 |
|
f******g 发帖数: 70 | 24 4BR/3BA with a bonus room in East Cobb location! Excellent School district
with POPE High, Hightower Middle, and Mountain view Elem. Recently
renovated basement could be used as in-law suite or older teen retreat.
Close to Aquatic Center, art place, library, and shopping. Plenty of storage
. Newer baths and carpet. Professionally cleaned house waiting for you to
move in. 6-8 months lease term considered. $30 application fee per adult.
$1375/month.
Call or text Elain at 954-604-1836
Email tina... 阅读全帖 |
|
h*********a 发帖数: 1605 | 25 North Kirkland neighborhood 华盛顿湖附近3房两卫独立屋出租,环境优美,生活交
通便利,离google,Kirkland downtown都很近,5分钟以内车程,走路10分钟到
Juanita bay park
10分小学(Peter kirk elem)和中学(Kirkland middle)
availiable now, 可签month to month lease
有意请站短 |
|
r******r 发帖数: 30 | 26 Excellent upgraded 4 bedroom house with unique tri-level floor plan. Vaulted
ceilings and hardwood flooring. Spacious kitchen with high-end appliances
and custom wood cabinets. Outdoor sport court and large deck in serene and
private fenced backyard. Attached 2-car garage. Clyde hill elem and Bellevue
high. Easy access to downtown Bellevue, Kirkland and Seattle. |
|
y*****o 发帖数: 178 | 27 http://sfbay.craigslist.org/sby/roo/1385490003.html
两层楼的townhouse,想出租一间主卧室(带独立卫生间),见上面链接的图片。
学区很好:Guadalupe Elem (921), Dartmouth Middle (854), Leigh High (805).社
区极其安静,环境幽雅,有大片绿地,以及网球场和游泳池。
open的车位很多,交通方便,离学校和购物都不远。
希望无毒品,不吸烟,无过夜客,无宠物。最好是女性,学生或者职业人士。
分担部分水电费用,其他(包括电视,网络,垃圾等)均免费提供。
租金:$900/月
有意请联系:l*********[email protected]
或致电:408-829-2273 |
|
y*****o 发帖数: 178 | 28 http://sfbay.craigslist.org/sby/roo/1418442769.html
两层楼的townhouse,想出租一间主卧室(带独立卫生间),见上面链接的图片。
学区很好:Guadalupe Elem (921), Dartmouth Middle (854), Leigh High (805).社
区极其安静,环境幽雅,有大片绿地,以及网球场和游泳池。
open的车位很多,交通方便,离学校和购物都不远。
希望无毒品,不吸烟,无过夜客,无宠物。最好是女性,学生或者职业人士。
分担部分水电费用,其他(包括电视,网络,垃圾等)均免费提供。
租金:$850/月
有意请联系:l*********[email protected]
或致电:408-829-2273
About the room & the house:
* Large & bright master bedroom (11 X 17) with private bath.
* Large closet (four doors).
* Located in a beautiful 2bed/ 2.5bath townh |
|
f********l 发帖数: 1473 | 29 Available December 1 or earlier
• Top Schools – Graystone elem, Bret Harte junior, Leland hi, API 951
/911/870
• 4 Bedrooms / 2 Bath, new remodeled, big new kitchen, hardwood Floor
in all rooms
• Central heating and air conditioning; All home applicants included
• Huge 12,000 sf lot with great parking area, deck and play ground; no
or min yard work
• No, partially or fully furnished, your choices!
• $2,690/mo. on 12-month lease, plus one month deposit
Fell fre... 阅读全帖 |
|
w****8 发帖数: 5 | 30 $2400 / 4br - $2400/4 BR WALK TO GREAT SCHOOLS, SPACIOUS SINGLE FAMILY雅房出
租 (san jose north) (map)
4 BR/2BA SPACIAL & BRIGHT HOUSE NEAR SCHOOLS AND PARKS 95132
- half furnished house, include 2 sofas in living room, one big book shelf &
sofabed in extra living room. TV might included
- Separate living room, family room, and dining area approximately 1800 sq
ft .
- 2 big living rooms (one used as masterbedroom currently); 4 bedrooms;
- New colored concrete backyard w/ large vegetable boxes and BB... 阅读全帖 |
|
f******g 发帖数: 70 | 31 4BR/3BA with a bonus room in East Cobb location! Excellent School district
with POPE High, Hightower Middle, and Mountain view Elem. Recently
renovated basement could be used as in-law suite or older teen retreat.
Close to Aquatic Center, art place, library, and shopping. Plenty of storage
. Newer baths and carpet. Professionally cleaned house waiting for you to
move in. 6-8 months lease term considered. $30 application fee per adult.
$1375/month.
Call or text Elain at 954-604-1836
Email tina... 阅读全帖 |
|
h*********a 发帖数: 1605 | 32 North Kirkland neighborhood 华盛顿湖附近3房两卫独立屋出租,环境优美,生活交
通便利,离google,Kirkland downtown都很近,5分钟以内车程,走路10分钟到
Juanita bay park
10分小学(Peter kirk elem)和中学(Kirkland middle)
availiable now, 可签month to month lease
有意请站短 |
|
r******r 发帖数: 30 | 33 Excellent upgraded 4 bedroom house with unique tri-level floor plan. Vaulted
ceilings and hardwood flooring. Spacious kitchen with high-end appliances
and custom wood cabinets. Outdoor sport court and large deck in serene and
private fenced backyard. Attached 2-car garage. Clyde hill elem and Bellevue
high. Easy access to downtown Bellevue, Kirkland and Seattle. |
|
m*****n 发帖数: 5245 | 34 ☆─────────────────────────────────────☆
shuke (小白) 于 (Mon Dec 18 17:49:26 2006) 提到:
1. sorted arrays, compute their intersection
what if the sizes of arrays are quite different
2. People are interested in various products.
How can you identify the official webpage of products?
☆─────────────────────────────────────☆
chrysany (chrysany) 于 (Mon Dec 18 18:33:17 2006) 提到:
For two sorted arrays, maintain one pointer for each array, increase the
pointer for the array whose current elem |
|
c****l 发帖数: 138 | 35 I have a question: since the question asks for the median of X U Y, what if
X and Y have some elements in common? The number of common elemements can be
from 0 to min(m, n), right? Thanks. |
|
r**u 发帖数: 1567 | 36 move l, until A[l] is in B.
This removes those elements not in B.
E.g., if A=1,2,2,4,3,1,5,7,3,5,2 B=3,5
First move r to 5, the windows is 1,2,2,4,3,1,5
Then we need to find current min window, so we move l to 3 and get rid of
those elements not in B. Current min window is 3,1,5 .
Next move l,直到one elem of B is not in the window.
And window becomes 1,5, we need to find the next min window which has both 3
,5. So r moves to 3, window is 1,5,7,3. Then go back to previous step...... |
|
b****r 发帖数: 1272 | 37 请问linksedHashMap对第三条怎么实现的:iii) Optimal algorithmic random access
time to any element knowing only the index of insertion.
given index, random access elem in linkedlist?
update |
|
S******A 发帖数: 1002 | 38 worst case, already sorted, always pick first or last elem as pivot bah?
randomly pick pivot |
|
r****o 发帖数: 1950 | 39 假设一个结构
struct elem{
unsigned int k : 1;
};
怎么测量它的长度呢? |
|
S******A 发帖数: 1002 | 40 padding: add same number of elems on left and right - what if we cannot do
it? hmm good question.
额外空间? why bother considering this? space is still in order of O(n) |
|
g******i 发帖数: 354 | 41 "Sort完然后用19减一下就可以Binary Search了" 这个好像不行。 你能把程序写出来
吗?
前面的讨论很对,Sort完然后用 Binary Search 应该不行的。 请达人指正。
另外, 我修改了原帖, 原来的题目有空间限制, 用Hash不好。
不过, 如果用Hash的话, 程序如下,关键也是用Hash查找 sum-a[i], 时间复杂度是O(1) if we use Hash to search. 整个程序
complexity is O(n)。
void findSum2() {
int[] a = {8, 10, 2, 9, 5, 7, 1};
int sum = 19;
HashMap hm = new HashMap();
for (int i=0; i
hm.put(a[i], i); //i is the index of the eleme |
|
d****n 发帖数: 233 | 42 Since it's a circular sequence, we want to find the optimal start point in
this sequence, so that the LIS exists in it. we have two ways to solve it.
1. Start at arbitary element and form a sequence, repeat this sequence and
find the LIS from the new sequence of size 2N. of course, we can stop early
if a LIS with length N is find(if all the elements are the same in the
sequence). the complexity will be O(2N*Log(2N))
2. Start at arbitary element and form a sequence, find all the ending
eleme |
|
l*****a 发帖数: 14598 | 43 I am confused of the explaination
=============================================
Direct application of the quick sort based selection algorithm
The quick sort based selection algorithm can be used to find k smallest or
k largest elements. To find k smallest elements find the kth smallest
element using the median of medians quick sort based algorithm. After the
partition that finds the kth smallest element, all the elements smaller
than the kth smaller element will be present left to the kth eleme |
|
m*****g 发帖数: 226 | 44 来自主题: JobHunting版 - 一道面试题 数学不好。请问这样做错在那里
let the num of ways be f(N,x)
f(N,x) = 2 if N/2=x; f(N,x) = 0 if N/2
let f(N-1,x) be a non-zero solution
adding another elem, f(N,x) = f(N-1,x)*x
but this makes f(N,x) = 2*pow(x, N-k) where k=2x |
|
j***n 发帖数: 301 | 45 Given an integer array A[], what preprocessing you need to do so that when g
iven i and j such that i <= j, you can tell in O(1) time the number of eleme
nts in the array having values between and including i and j.
A graph is given. You need to design a data structure with minimum space com
plexity such that it does the follows
--> Finds whether nodes u and v have a path in between them in O(1) time.
--> Finds whether there is a path of length l between u and v in O(k) time.
What does the follo |
|
r*d 发帖数: 896 | 46 程序是统计的n的二进制表示中1的个数。
g
eleme
com
time. |
|
s*******s 发帖数: 46 | 47
g
eleme
先sort A[], 然后得到一个数组B[k],表示A[]
然后答案就是B[t2]-B[t1] (A[t1]=i, A[t2]=j)
com
time.
what is k?另外,第二个是否需要最短距离还是任意距离?
使用一个dp算法可以得到图中任意两点最短距离。
然后你可以使用linkedlist来表示这个sparse矩阵。 |
|
a******7 发帖数: 106 | 48 cool man! Thanks! I think you can definitely get an offer.
About the data structure for tetris game, my idea is to use a bitmap to
express each shape, and store 4 rotated shaped in circular double link
list, each time when rotate function is called, it either point to the
left and right elem, which is pre-computed bitmap.
The board is also a bitmap, say M*M, so as long as we have the position
of the shape on board, say the rightmost coordinates (x,y), and the size
of the shape bitmap N*N. For ea... 阅读全帖 |
|
a******7 发帖数: 106 | 49 About 用一个array来实现queue, is it a priority queue with getMin() or a
normal queue with push(), pop(), top().
If it's a priority queue, we need implement a heap, with siftup(), siftdown
to maintain the property of heap
If it's a normal queue, we need implement a ring buffer, with the head and
tail pointer and number of elems in queue. |
|
z*******y 发帖数: 578 | 50 前些日子面的,尽管code都写出来了 但那个面试官好像很不喜欢Java,我的code都用
Java写的
最后也没给下一轮
1) Locate a substring within a string. (Find the first occurance of
needle in haystack, or return null.)
char* strstr(char* haystack, char* needle) {
}
mention了一下KMP算法,然后用那个最直接的方法写的code. 他该不会是想让我把KMP
算法在interview里敲出来吧
2)/*
* Given an array and a value, remove all instances of that
* value in place and return the new length. The order of
* elements can be changed. It doesn't matter what you leave
* beyond the new length.
*/
size_t remo... 阅读全帖 |
|