由买买提看人间百态

topics

全部话题 - 话题: lookup
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)
S*******e
发帖数: 525
1
【 以下文字转载自 English_Communication 俱乐部 】
发信人: SwiftDove (Swift Dove), 信区: English_Communication
标 题: Word List Web Tool for Anyone + Dictionary Lookup in page.
发信站: BBS 未名空间站 (Wed Jul 18 00:38:41 2012, 美东)
If you use Google Chrome Browser, I extended a dictionary lookup tool which
can let you lookup with one click the word without leaving the page. At the
same time, you can add the word to your word lists at http://www.elookinto.com/wordlist. The extension is at: https://chrome.google.com/webstore... 阅读全帖
X****r
发帖数: 3557
2
Name lookup 就是指编译器怎么找到程序里的某一个名称指代的是什么。
比如你写
A a = f(b);
编译器就要知道A, a, f, b这四个符号分别是在哪里定义或声明的,
才能正确地理解你这个语句的意义。若f是一个函数,或者f是一个类型,
那f(b)这个表达式的含义就大不一样。
Name lookup的详细规则见C++03里的[basic.lookup]
d******3
发帖数: 70
3
This Youtube video explains the details of how Koenig Lookup works under
different scenario.
http://www.youtube.com/watch?v=TxgPZXe8XTo
d******3
发帖数: 70
4
The purpose of namespaces is to avoid name clash. It seems Koenig Lookup
mixes up the names and defeats the very purpose of namespace. Why do we
need Koenig Lookup? This video explains the rationale of Koenig and
introduce a principle of namespace design.
http://www.youtube.com/watch?v=ZBK7aZ8v6vE
m*****u
发帖数: 1342
5
来自主题: Automobile版 - VIN lookup help: JF1SG65626H744901
Carfax/autocheck lookup will be greatly appreciated.
Thanks :-)
e**p
发帖数: 4259
6
【 以下文字转载自 Statistics 讨论区 】
发信人: eucp (Inner peace), 信区: Statistics
标 题: 有用excel pivot table和lookup table的么?
发信站: BBS 未名空间站 (Thu Mar 27 01:52:56 2014, 美东)
刚刚自学学会用excel pivot table,但复杂一些功能不会,比如说我建立一个look-up
table,大概是这样的
COUNT Label
AA AUSTRIA Austria
AA BELGIUM Belgium
AA BULGARIA Bulgaria
AA CZECH Czech
AA DENMARK Denmark
AA FINLAND Finland
AA FRANCE France
.....
.....
我要跟另外一个table 联系起来
CTRY AREA UNITS
AA AUSTRALIA ASIA/... 阅读全帖
G****A
发帖数: 4160
7
问题在:
http://stackoverflow.com/questions/1734893/overloading-a-method
subclass-in-c
下面的解释中提到"Name lookup happens before overload resolution"。
谢谢
g****8
发帖数: 2828
8
如果AA 都是那样的,不需用 lookup 啦。
Mid() 把国家取出来,
Pivot table 把area country做 category, area放上面,在format那里把subtotal 什
么的去掉, 最后units 放数据那里,选sum of
d**********o
发帖数: 1321
9
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
hw3b c-.y file
上面这一楼贴了载止hw3b deadline时我match的结果(也就是老师可以以这些不match
的ERROR为借口不给后来我补上的成绩),但是因为当时我还是没有写完,后来感恩节
期间就接着又写了一些,而且hw5是based on hw3 & hw3b的基础上(当我hw5是based
on更好的hw3的结果时,我应该可以得更多的分吧)。
hw4因为写得比较顺利,就不曾保留任何交上去作业的output,没有什么一目了然的结
果是我可以贴在这里的。原本我是想要把自己最的一次作业hw5贴出来的,但那已经是
一个完整的compiler,而且以后我还需要用自己的course project来找工作,所以一定
就不贴最终结果了。那就贴一个hw3b的c-.y文件吧,它集中的hw1、hw2、hw3、 hw3b的
结果,是我自己hw3b *.y文件的最完整版本。这些作业里面也有很多机关一一人为增加
的难度,比如那六七个IO相关的function,不仅traverse tree、build syntax tree的
时候会成为一个考点(把它们作为一个node连在syntax... 阅读全帖
d**********o
发帖数: 1321
10
来自主题: WebRadio版 - 潜水员冒泡兼征版友意见
hw3b c-.y file
上面这一楼贴了载止hw3b deadline时我match的结果(也就是老师可以以这些不match
的ERROR为借口不给后来我补上的成绩),但是因为当时我还是没有写完,后来感恩节
期间就接着又写了一些,而且hw5是based on hw3 & hw3b的基础上(当我hw5是based
on更好的hw3的结果时,我应该可以得更多的分吧)。
hw4因为写得比较顺利,就不曾保留任何交上去作业的output,没有什么一目了然的结
果是我可以贴在这里的。原本我是想要把自己最的一次作业hw5贴出来的,但那已经是
一个完整的compiler,而且以后我还需要用自己的course project来找工作,所以一定
就不贴最终结果了。那就贴一个hw3b的c-.y文件吧,它集中的hw1、hw2、hw3、 hw3b的
结果,是我自己hw3b *.y文件的最完整版本。这些作业里面也有很多机关一一人为增加
的难度,比如那六七个IO相关的function,不仅traverse tree、build syntax tree的
时候会成为一个考点(把它们作为一个node连在syntax... 阅读全帖
i***e
发帖数: 452
11
来自主题: JobHunting版 - 也贴个转罗马数字的code
发现板上有很多版本, 都不是很简单, 自认为我的版本比较简单..呵呵!greedy 的思
想。
string intToRoman(int num) {
string table[] = {"M", "CM","D","CD","C","XC","L","XL","X","IX","V","IV"
,"I"};
int values[] = {1000,900,500,400,100,90,50,40,10,9,5,4,1};
string result;
for(int iter = 0; iter < 13;)
{
if(num >= values[iter])
{
result += table[iter];
num -= values[iter];
}
else
++iter;
}
return result;
}
int romanToInt(string s) {
int ... 阅读全帖
y***n
发帖数: 1594
12
来自主题: JobHunting版 - leetcode上最搞笑的是这题
以前有个牛人贴的code被我Evernote下来了。
int romanToInt(string s) {
int result = 0;
map lookup;
lookup['I'] = 1;
lookup['V'] = 5;
lookup['X'] = 10;
lookup['L'] = 50;
lookup['C'] = 100;
lookup['D'] = 500;
lookup['M'] = 1000;
for(int i = 0; i < s.size() -1; i++)
{
if(lookup[s[i]] < lookup[s[i+1]])
result -= lookup[s[i]];
else
result += lookup[s[i]];
}
result += lookup[s[s.size()-1]];
return result;
}
int m... 阅读全帖
b***e
发帖数: 1419
13
来自主题: JobHunting版 - LinkedIn onsite一道题
/*
Find all substring palindomes. No dupe.
Vanilla JS. Run it with node.js or in browser console.
*/
function reverse(s) {
var o = '';
for (var i = s.length - 1; i >= 0; i--)
o += s[i];
return o;
};
var p = function(s) {
var prevLookup = {};
var nextLookup = {};

for (var i = 0; i < s.length; i++) {
var c = s.charAt(i);
if (!prevLookup[c]) {
prevLookup[c] = [];
nextLookup[c] = [];
}
}
for (var i = 0; i <... 阅读全帖
b***e
发帖数: 1419
14
来自主题: JobHunting版 - LinkedIn onsite一道题
/*
Find all substring palindomes. No dupe.
Vanilla JS. Run it with node.js or in browser console.
*/
function reverse(s) {
var o = '';
for (var i = s.length - 1; i >= 0; i--)
o += s[i];
return o;
};
var p = function(s) {
var prevLookup = {};
var nextLookup = {};

for (var i = 0; i < s.length; i++) {
var c = s.charAt(i);
if (!prevLookup[c]) {
prevLookup[c] = [];
nextLookup[c] = [];
}
}
for (var i = 0; i <... 阅读全帖
s****a
发帖数: 6
15
来自主题: JobHunting版 - 一道算法题
题目是有一组字符串,可以用任意的数据结构存。要实现带通配符的快速查找。
example:
char* strings[] = { "abc", "ace", "add" };
lookup("abc") return true
lookup("acc") return false
lookup("a?c") return true
lookup("?ac") return false
lookup("a?") return false
这个例子里'?'是通配符
b****k
发帖数: 23
16
由于不能展示图片,原文可以参考
http://www.cnblogs.com/biwork/p/4165649.html
微软BI SSIS 2012 ETL 控件与案例精讲 (http://www.hellobi.com/course/21) 课程从2014年9月开始准备,到2014年12月在 天善BI学院 (http://www.hellobi.com)正式上线。
•100多天的时间共完成了 51个视频的录制,包含49个原创案例,总共1460余分
钟,共计 24 个小时。
•每一个案例的准备时间耗时 4 - 5个小时,有的案例的设计,思路的整理耗时
8 个小时 - 16 个小时。
本课程涵盖了微软 BI SSIS 几乎所有常用控件的讲解,讲解的内容不是按照书本照本
宣科的简单的告诉大家如何使用,而是通过大量的案例,代码对各个知识点进行穿插讲
解。每一个基本案例都是由我个人原创,并加入了个人的测试,总结和归纳部分。每一
个案例自始至终,来龙去脉,所有的代码和实现操作过程均在视频课程中一步一步现场
编程和实现。因此大家是完全可以按照视频中的操作步骤实现所有讲解的... 阅读全帖
w*******y
发帖数: 60932
17
Link:
http://itunes.apple.com/us/app/scany-network-port-scanner/id328
Link:
http://happymagenta.com
*** FEATURES ***
- Scan both LAN and the Internet
- Scan any IP address or network range
- Bonjour hostnames lookup
- Windows hostnames lookup (NetBIOS, Samba)
- Device names lookup (UPnP, SSDP, DLNA)
- Country of origin detection of the network owner
- Network range and AS number lookup
- MAC address and hardware vendor lookup
- Wake on LAN or Wi-Fi (by MAC address)
- Wake over the Internet (usin... 阅读全帖
d********n
发帖数: 54
18
来自主题: JobHunting版 - Google面经
本人PhD,3年半工作经验。2个月前收到Google recruiter电话,开始面试,一个月前
拿到offer,然后开始了漫长的谈判,昨天终于签字。上来share一下面经。
2年前面过google,职位不喜欢,把它拒了。因为他们有记录,所以这次只安排了4人面
试。
第一个是老美,先问了一些简单问题,比如怎么判断一个32 bit是big endian 还是
small endian等等。最后出了一道算法题,也很容易,给定K个sorted array,要求输
出一个大的sorted array。简单的merge sort就解决了。不过merge sort 要求每次K个
array中,最小的element。简单的当然是scan这K个array。我提出可以把K个array的当
前element放入Heap structure,这样每次搜索就从O(K)降低到O(logK)。最后写了个程
序。
第二个是老中。也是先问了一些简单问题,然后让我设计一个分布式文件系统,给定
path name,可以读写文件。具体的system design这里就不提了。其中一个细节是,给
定path name,怎么知... 阅读全帖
f********3
发帖数: 210
19
来自主题: JobHunting版 - 谁能给个hashset实现的例子么?
比如面试时,用set显然更好写。但hashset快。
hashset不是STL里面的,那么是不是所有的函数都得自己写。。。。感觉太麻烦了。。。
在这里看到个例子。那么面试时是不是还得这样写?
有没有好点的hashset的例子?多谢了
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
{
return strcmp(s1, s2) == 0;
}
};
void lookup(const hash_set, eqstr>& Set,
const char* word)
{
hash_set, eqstr>::const_iterator it
= Set.find(word);
cout << word << ": "
<< (it != Set.end() ? "present" : "not prese... 阅读全帖
w**********2
发帖数: 20
20
来自主题: JobHunting版 - G家 system design 和 open ended questions
大家好,5天前,hc 送审的时候, 纠结通过率,搜到了这个网站,(这网站在新加坡
貌似没什么人用) 相见恨晚。。 3天前,写了onsite 小面筋,想求个祝福。可惜新注
册的用户,禁言三天,没有发上来。三天后,hc 的结果出来了, 还要加一轮。不管机
率如何, 既然还有希望,准备拼一枪。
“our profile was actually reviewed at our hiring committee in the US this
morning and I just received the results. The committee has actually decided
they need some additional data through a couple more interviews.
Accordingly, I'd like to set up 2 more interviews for you, these interviews
will be focused on system design and open ended questions.”
看了版上... 阅读全帖
r****s
发帖数: 1025
21
来自主题: JobHunting版 - G家 system design 和 open ended questions
这个就扯淡了,很简单的consisten hashing的题目。天下所有的高级码工都知道,你
不知道?
9. 然后让我设计一个分布式文件系统,给定
path name,可以读写文件。具体的system design这里就不提了。其中一个细节是,给
定path name,怎么知道哪个node拥有这个文件。我提出需要实现一个lookup function
,它可以是一个hash function,也可以是一个lookup table。如果是lookup table,
为了让所有client sync,可以考虑额外做一个lookup cluster。然后Interviewer很纠
结,既然可以用hash function,为什么还搞得那么复杂。我就告诉他hash function的
缺点。假定一开始有N个node,hash function把M个文件uniformly distribute到N个
node上。某天发现capacity不够,加了一个node。首先,要通知所有的client machine
,configuration 改变了。如果不想重启client machine的proce... 阅读全帖
w**********2
发帖数: 20
22
来自主题: JobHunting版 - G家 system design 和 open ended questions
大家好,5天前,hc 送审的时候, 纠结通过率,搜到了这个网站,(这网站在新加坡
貌似没什么人用) 相见恨晚。。 3天前,写了onsite 小面筋,想求个祝福。可惜新注
册的用户,禁言三天,没有发上来。三天后,hc 的结果出来了, 还要加一轮。不管机
率如何, 既然还有希望,准备拼一枪。
“our profile was actually reviewed at our hiring committee in the US this
morning and I just received the results. The committee has actually decided
they need some additional data through a couple more interviews.
Accordingly, I'd like to set up 2 more interviews for you, these interviews
will be focused on system design and open ended questions.”
看了版上... 阅读全帖
c********t
发帖数: 5706
23
来自主题: JobHunting版 - 问一个hashtable/hashmap capacity的问题
java API对hashmap capacity有这么一段话
Higher capacity values decrease the space overhead but increase the lookup
cost (reflected in most of the operations of the HashMap class, including
get and put)
我不明白大capacity, 为什么会增加lookup cost呢?lookup不是用hash value作index
直接取value吗?我觉得大capacity减少了collision,应该decrease lookup cost才对
啊。
c*****s
发帖数: 180
24
来自主题: WaterWorld版 - PURE WATER DO NOT NETER PLEASE
SAS OnlineTutor®: Advanced SAS®
Combining Data Horizontally 5 of 47
backnextlesson menuLearning Pathhelp menu

Working with Lookup Values Outside of SAS Data Sets
Remember that it is not necessary for your lookup table to be a SAS data set
. Suppose you want to combine the data from your base table with lookup
values that are not stored in a SAS data set. You can use the following
techniques to hard-code lookup values into your program:
* the IF-THEN/EL
c*****s
发帖数: 180
25
来自主题: WaterWorld版 - PURE WATER DO NOT NETER PLEASE
SAS OnlineTutor®: Advanced SAS®
Combining Data Horizontally 8 of 47
backnextlesson menuLearning Pathhelp menu

Working with Lookup Values Outside of SAS Data Sets (continued)
?
Select the statement below that is true.
If the lookup values are not stored in a SAS data set, you must use the
IF-THEN/ELSE statement to perform a table lookup operation.
You can use either the IF-THEN/ELSE statement or the ARRAY statement to
return multiple lookup
t********k
发帖数: 808
26
方法一
InitialContext ic = new InitialContext();
Object lookup = ic.lookup("EJBLocalJndiName");
EJBHome home (EJBHome)PortableRemoteObject.narrow(lookup,EJBHome.class);
EJBLocal local = home.create();
方法二
InitialContext ic= new InitialContext();
EJBHome home = (EJBHome)ic.lookup("EJBLocalJndiName");
EJBLocal local = home.create();
我用2调用Session Bean里的方面,
方法声明在Local Interface里,SessionBean里有这些方法的实现,而在Home Interface只
有create方法,返回Local Interface
用3调用CMP
方法声明在Home Interface里(如finder之类的方法),在Local Interfac
S******3
发帖数: 66
27
actually, hash can do it with some trick. it's pretty fast and does not
require much temporary space.
some pseduo code for your reference (you need rename date variables first).
I think it worth some dollars, at least WB!
/* check to see if the current record has a match in the hash object */
rc = lookup.find(key: id);
/* if a match is found... */
if rc = 0 then do;
/* check the dates - if comparison is true, output the row */
if 1<=intck('month', date_b, date_a)<=60 then output;... 阅读全帖
i**********e
发帖数: 1145
28
来自主题: JobHunting版 - BB 一题
用 hashtable 的话直接 hash Jay,John, JACK to "j", Jay and Jack to "ja",
John to “jo",以此类推。。。(在 C++ 这个叫 hash_multimap,一个 key 可以有
多个对应的 values)
输入 "J" 的时候就直接做 hashtable lookup for key "j","Ja" 的时候就 lookup
key "ja" 就好了。
用 hashtable 其实类似于用 n-ary tree(也就是 prefix tree/trie),每个 node
有 26 个孩子 ("a-z")。hashtable 的坏处是每次 lookup 都要用 hash function 来
计算,而且还可能有冲突而导致效率更慢。
一些常见面试题的答案与总结 -
http://www.ihas1337code.com
g***j
发帖数: 1275
29
来自主题: JobHunting版 - 如何检查是否连续
给定一个range,假设1-20,给定一个输入,假设4 3 5 6 如何判断输入是否是连续的
。 输入的可能不是有序的
我答,给个数组,1-20的,然后map进去,然后扫描数组,他说如何改进,我说用bit
map,他说那如何判断bit map是否是连续的1呢,我说往右边移动,然后根据最后一位
判断,他说如何改进,我说考虑所有可能的bitmap情况一个个比较,这个我胡说的,自
己也没有想清楚。
后来他说如果要更加快更加快,如果不准用所有判断,只用一句话,怎么搞?
我不知道了,他提示我,给1-1000,怎么迅速判断一个数是否是质数?我说求出所有质
数然后看那个数是否是啊,他说,对,这个题目也这么搞,用一个lookup table
后来我在想怎么lookup table呢?难道把所有可能的情况都放在lookup table里面?
他反复强调只能用一句code
大家有什么想法?
l******6
发帖数: 340
30
来自主题: JobHunting版 - L家Onsite面经
第二题我先以为是要分到多机, hash msid 然后mod 分一下。看来楼主的描述,看来
我naive了
理一理楼组后来描述的思路
use a fix sized memory to store message data
const char* head , const size_t MemSize
use a hashMap> IdxTable to support fast lookup
have a freeMemHead , represent as size_t freeOffset
a freeMemSize as size_t freeMemSize
have a dataMemHead, as size_t dataOffset
Initially , freeOffset = 0, freeMemSize = MemSize, dataOffset = 0,
when applying to store a message, check if... 阅读全帖
l******6
发帖数: 340
31
来自主题: JobHunting版 - L家Onsite面经
第二题我先以为是要分到多机, hash msid 然后mod 分一下。看来楼主的描述,看来
我naive了
理一理楼组后来描述的思路
use a fix sized memory to store message data
const char* head , const size_t MemSize
use a hashMap> IdxTable to support fast lookup
have a freeMemHead , represent as size_t freeOffset
a freeMemSize as size_t freeMemSize
have a dataMemHead, as size_t dataOffset
Initially , freeOffset = 0, freeMemSize = MemSize, dataOffset = 0,
when applying to store a message, check if... 阅读全帖
u*****n
发帖数: 126
32
来自主题: JobHunting版 - Pure Storage面经
在他们家遇到了两个傻B阿三。一个不停的纠正我的逗号和分号,另外一个给的hints都
是废话。最后挂了。他们家的阿三是我面过的所有公司中最极品的。所以面试他们家要
小心傻B阿三。当然他们家的华人美女HR相当的nice,是我遇到的所有HR中最nice的。
总共面了四轮:
第一轮:定义buddy system为一棵complete binary tree。一个node可能为0也可能为1
. 它的
value为1,当且仅当它所有的child的value均为1.
1
|
1 2
| |
1 2 3 4
| | | |
1 2 3 4 5 6 7 8
实现下列的method。
1' clearBit(int offset, int len);
2' setBit(int offset, int len);
第二轮:设计一个task dispatching system,里面有一个task queue和两个function。
1’ trigger。这个func... 阅读全帖
u*****n
发帖数: 126
33
来自主题: JobHunting版 - Pure Storage面经
在他们家遇到了两个傻B阿三。一个不停的纠正我的逗号和分号,另外一个给的hints都
是废话。最后挂了。他们家的阿三是我面过的所有公司中最极品的。所以面试他们家要
小心傻B阿三。当然他们家的华人美女HR相当的nice,是我遇到的所有HR中最nice的。
总共面了四轮:
第一轮:定义buddy system为一棵complete binary tree。一个node可能为0也可能为1
. 它的
value为1,当且仅当它所有的child的value均为1.
1
|
1 2
| |
1 2 3 4
| | | |
1 2 3 4 5 6 7 8
实现下列的method。
1' clearBit(int offset, int len);
2' setBit(int offset, int len);
第二轮:设计一个task dispatching system,里面有一个task queue和两个function。
1’ trigger。这个func... 阅读全帖
u*****n
发帖数: 126
34
来自主题: JobHunting版 - 请教个面经里的设计题
抱歉没仔细看你的解法。很好的思路。
原题的解法类似,只不过题目本身比较特殊,完整的题目如下。因为是整数,你可以假
设有很大的内存,同时不必考虑collision。
设计一个Map,满足下面的时间复杂度。
add: O(1) deletion: O(1) lookup: O(1) clear:O(1) iterate: O(number of
elements)。
提示:
如果我们用randomly accessed array,复杂度如下:
add: O(1) deletion: O(1) lookup: O(1) clear: O(size of array) iterate:
O(size of array)
如果我么用sequential array, 复杂度如下:
add: O(1) deletion: O(number of elements) lookup:O(number of elements)
clear: O(1) iterate:O(number of elements)
所以我们需要把这两个方法整合起... 阅读全帖
u*****n
发帖数: 126
35
来自主题: JobHunting版 - 请教个面经里的设计题
抱歉没仔细看你的解法。很好的思路。
原题的解法类似,只不过题目本身比较特殊,完整的题目如下。因为是整数,你可以假
设有很大的内存,同时不必考虑collision。
设计一个Map,满足下面的时间复杂度。
add: O(1) deletion: O(1) lookup: O(1) clear:O(1) iterate: O(number of
elements)。
提示:
如果我们用randomly accessed array,复杂度如下:
add: O(1) deletion: O(1) lookup: O(1) clear: O(size of array) iterate:
O(size of array)
如果我么用sequential array, 复杂度如下:
add: O(1) deletion: O(number of elements) lookup:O(number of elements)
clear: O(1) iterate:O(number of elements)
所以我们需要把这两个方法整合起... 阅读全帖
d********w
发帖数: 363
36
来自主题: JobHunting版 - 系统设计能力提高捷径
品味来了。
Basics and Algorithms
The Five-Minute Rule Ten Years Later, and Other Computer Storage Rules of
Thumb (1997): This paper (and the original one proposed 10 years earlier)
illustrates a quantitative formula to calculate whether a data page should
be cached in memory or not. It is a delight to read Jim Gray approach to an
array of related problems, e.g. how big should a page size be.
AlphaSort: A Cache-Sensitive Parallel External Sort (1995): Sorting is one
of the most essential algorithms in... 阅读全帖
a*********2
发帖数: 187
37
来自主题: JobHunting版 - 请教一道面试题
原来的面经是:
*****************************************************
设计一个Map,满足下面的复杂度。
add: O(1) deletion: O(1) lookup: O(1) clear:O(1) iterate: O(number of
elements)。
提示:
如果我们用randomly accessed array,复杂度如下:
add: O(1) deletion: O(1) lookup: O(1) clear: O(size of array) iterate:
O(size of array)
如果我么用sequential array, 复杂度如下:
add: O(1) deletion: O(number of elements) lookup:O(number of elements)
clear: O(1) iterate:O(number of elements)
所以我们需要把这两个方法整合起来。
*******************... 阅读全帖
x*****0
发帖数: 452
38
来自主题: JobHunting版 - 请教一道数据结构的设计题
下面这道题是在版上看到的一道题。请问大家有什么想法吗?
设计一个Map,满足下面的时间复杂度。
add: O(1) deletion: O(1) lookup: O(1) clear:O(1) iterate: O(number of
elements)。
提示:
如果我们用randomly accessed array,复杂度如下:
add: O(1) deletion: O(1) lookup: O(1) clear: O(size of array) iterate:
O(size of array)
如果我么用sequential array, 复杂度如下:
add: O(1) deletion: O(number of elements) lookup:O(number of elements)
clear: O(1) iterate:O(number of elements)
所以我们需要把这两个方法整合起来。
对于这题的提示,sequential array指的就是link list? 把每一对阅读全帖
f******e
发帖数: 164
39
来自主题: SanFrancisco版 - Pure Storage面经, 遇到傻X阿三 (转载)
【 以下文字转载自 JobHunting 讨论区 】
发信人: unichen (greedyrouter), 信区: JobHunting
标 题: Pure Storage面经, 遇到傻X阿三
发信站: BBS 未名空间站 (Sat May 24 11:44:44 2014, 美东)
在他们家遇到了两个傻B阿三。一个不停的纠正我的逗号和分号,另外一个给的hints都
是废话。最后挂了。他们家的阿三是我面过的所有公司中最极品的。所以面试他们家要
小心傻B阿三。当然他们家的华人美女HR相当的nice,是我遇到的所有HR中最nice的。
总共面了四轮:
第一轮:定义buddy system为一棵complete binary tree。一个node可能为0也可能为1
. 它的
value为1,当且仅当它所有的child的value均为1.
1
|
1 2
| |
1 2 3 4
| | | |
1 2 3 4 5 6 7 8
实现下列的metho... 阅读全帖
G***o
发帖数: 5158
40
来自主题: Seattle版 - 还是看IRS的数据靠谱
当然,这个历史数据看了简直就让人吐血,2000年到2009年扣除通胀后收入降低2/3啊。
http://www.melissadata.com/lookups/TaxZip.asp?Zip=98039&submit1
http://www.melissadata.com/lookups/TaxZip.asp?Zip=98004&submit1
就算穷点的地方也降了一半:
http://www.melissadata.com/lookups/TaxZip.asp?Zip=98072&submit1
G***o
发帖数: 5158
41
来自主题: Seattle版 - 还是看IRS的数据靠谱
当然,这个历史数据看了简直就让人吐血,2000年到2009年扣除通胀后收入降低2/3啊。
http://www.melissadata.com/lookups/TaxZip.asp?Zip=98039&submit1
http://www.melissadata.com/lookups/TaxZip.asp?Zip=98004&submit1
就算穷点的地方也降了一半:
http://www.melissadata.com/lookups/TaxZip.asp?Zip=98072&submit1
gy
发帖数: 620
42
Correct.
In SQL2000, it is called Bookmark lookup. In SQL2005 and up, it is called
Key lookup, and another one RID lookup.
gy
发帖数: 620
43
Correct.
In SQL2000, it is called Bookmark lookup. In SQL2005 and up, it is called
Key lookup, and another one RID lookup.
s******v
发帖数: 4495
44
来自主题: EmergingNetworking版 - LISP看起来很cool啊
这个够呛,改CPE是个非常艰巨而且不可能的任务,要是光应用在green-field,那要等
到猴年马月啊?
我的理解就是,ce/pe看到一个新的destination,然后通过udp lookup locator,然后
加个报头,等于是直接tunnel到destination。
工作量是一样的,只是把1)workload分到CE上一部分,2)local lookup变成lookup
over udp 3)整个routing table从分布在每个PE上,变成集中式
s******v
发帖数: 4495
45
来自主题: EmergingNetworking版 - LISP看起来很cool啊
这个够呛,改CPE是个非常艰巨而且不可能的任务,要是光应用在green-field,那要等
到猴年马月啊?
我的理解就是,ce/pe看到一个新的destination,然后通过udp lookup locator,然后
加个报头,等于是直接tunnel到destination。
工作量是一样的,只是把1)workload分到CE上一部分,2)local lookup变成lookup
over udp 3)整个routing table从分布在每个PE上,变成集中式
c*****t
发帖数: 1879
46
来自主题: Programming版 - 来来来,我也问个题 (转载)
I did a performance test. One using table lookup (see that stanford
link) and one this FPU method from 1 to 0xfffffffe on my P4 2.8, the
table lookup method is roughly 16x faster.
I think that the key is the cache miss in the test is virtually 0
(except the very first call). However, for FPU method, such utilization
can never take place. If this function is called frequently, then
cache miss should be rare. If this function is called rarely, then
it doesn't matter.
Conclusion: table lookup m
d*******o
发帖数: 493
47
来自主题: Statistics版 - Proc SQL 大量数据匹配的效率问题
楼主的Query execution plan 应该是
Select <-- Nested loop <-- index scan on [information] table
<-- table lookup on [address] table
Cost 主要在table lookup上。
解决办法是把你的lookup table[address] normalize
For example:
Chicago 205.1.1.1
Chicago 205.1.1.2
….
把ip做primary key,然后做one-to-many merge
这时候也可以用proc format或hash tree
以后的Query execution plan 应该是
Select <-- Nested loop <-- index scan on [information] table
<-- index scan on [address] table
h***i
发帖数: 3844
48
来自主题: Military版 - 这些AI就是垃圾吹牛的东西
智能是什么意思啊?
所谓的lookup table不就是归纳么。人类不也就是归纳么。
我怎么觉得人类就是自己搞了一个更大更复杂的lookup table 而已。
d*******a
发帖数: 578
49
来自主题: USANews版 - 看看哪些大学和城市左棍多
https://www.crowdpac.com/games/lookup/universities?from=groupme
isappinstalled=0
https://www.crowdpac.com/games/lookup/hometown?from=groupmessag
isappinstalled=0
排名第一的是WA的Vashon Island。
★ 发自iPhone App: ChineseWeb 11
w********9
发帖数: 64
50
Foreign reporters mailbox (2016)
h****[email protected]中国人权
信息发布:[email protected]/* */
[email protected]/* */国驻华使领馆
[email protected]/* */国驻广州总领馆[email protected]/* */
gov.uk(广州领事处)
[email protected]/* */国驻重庆领事馆[email protected]/* */
gov.uk(重庆领事处)
[email protected]/* */国驻上海总领事处
[email protected]/* */奥巴马
[email protected]/* */白宫[email protected]/* */——subscriptions@
subscriptions.usa.gov
n*****[email protected]新唐人
大纪元投稿Email(海外):[email p... 阅读全帖
1 2 3 4 5 6 7 8 9 10 下页 末页 (共10页)